Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: magic-gentoo@××××××××××××××.de, Zac Medico <zmedico@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] speeding up usage of portage in e-file / portage file list
Date: Sat, 23 May 2020 20:55:49
Message-Id: 35acba52-c96b-e2fa-b6ed-58beb036d01e@gentoo.org
In Reply to: Re: [gentoo-dev] speeding up usage of portage in e-file / portage file list by magic-gentoo@damage.devloop.de
1 On 5/23/20 1:41 PM, magic-gentoo@××××××××××××××.de wrote:
2 > Am 23.05.2020 um 22:20 schrieb Zac Medico:
3 >> On 5/23/20 1:02 PM, magic-gentoo@××××××××××××××.de wrote:
4 >>> I rewrote e-file in python by using the portage API [1]. But loading the
5 >>> API slows down the whole script. Is there any way to speed up my
6 >>> implementation? Have I done something fundamentally wrong?
7 >>
8 >> When I patched the portage API out of your script, I saw the run time
9 >> drop from 4.2 seconds to 3.2 seconds with this patch:
10 >> ...
11 >>
12 >> Are your results worse than mine?
13 >
14 > Nope, but maybe the phrase "loading the API" was misleading. I'd like to
15 > replace it with: "But using the API slows down the whole script.". This
16 > means it is much slower to get the additional informations by portage
17 > API than just grep'ing throught the ebuild files. If I run the python
18 > e-file on my machine it takes 3.2 seconds for a single file. The bash
19 > e-file show the same result within a second or so.
20 >
21 > regards
22 > Daniel
23 >
24 >
25
26 Since the portage API only added about 1 second to the python script
27 time, I guess it's on par with your bash implementation. ;-P
28 --
29 Thanks,
30 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] speeding up usage of portage in e-file / portage file list Daniel Buschke <magic-gentoo@××××××××××××××.de>