Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: 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:08:51
Message-Id: 7f4308af6b507a4d2601576e52b251f9379ba40e.camel@gentoo.org
In Reply to: [gentoo-dev] speeding up usage of portage in e-file / portage file list by magic-gentoo@damage.devloop.de
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

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 magic-gentoo@××××××××××××××.de