1 |
On Sat, 2020-05-23 at 22:02 +0200, magic-gentoo@××××××××××××××.de wrote: |
2 |
> Hi, |
3 |
> the current e-file tool of app-portage/pfl is written in bash. e-file is |
4 |
> a CLI tool which searches portagefilelist.de for a given file and list |
5 |
> additional informations based on the local portage. Latter is done by |
6 |
> grep'ing through the ebuild files which is fast but IMHO not very smart. |
7 |
> |
8 |
> I rewrote e-file in python by using the portage API [1]. But loading the |
9 |
> API slows down the whole script. Is there any way to speed up my |
10 |
> implementation? Have I done something fundamentally wrong? |
11 |
|
12 |
My only suggestion would be to use pkgcore instead of portage. It is |
13 |
compatible at configuration/data format level, so your script should |
14 |
work out of the box for Portage users. |
15 |
|
16 |
I'm not sure how much faster it will be. However, it will surely be |
17 |
more readable considering how horrible Portage API is. |
18 |
|
19 |
-- |
20 |
Best regards, |
21 |
Michał Górny |