On Sat, 2020-05-23 at 22:02 +0200, magic-gen...@damage.devloop.de wrote: > Hi, > the current e-file tool of app-portage/pfl is written in bash. e-file is > a CLI tool which searches portagefilelist.de for a given file and list > additional informations based on the local portage. Latter is done by > grep'ing through the ebuild files which is fast but IMHO not very smart. > > I rewrote e-file in python by using the portage API [1]. But loading the > API slows down the whole script. Is there any way to speed up my > implementation? Have I done something fundamentally wrong?
My only suggestion would be to use pkgcore instead of portage. It is compatible at configuration/data format level, so your script should work out of the box for Portage users. I'm not sure how much faster it will be. However, it will surely be more readable considering how horrible Portage API is. -- Best regards, Michał Górny
signature.asc
Description: This is a digitally signed message part