Gentoo Archives: gentoo-portage-dev

From: Paul Varner <fuzzyray@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [RFC] Package description index file format for faster emerge search actions
Date: Wed, 15 Oct 2014 17:27:26
Message-Id: 543EAE5B.2050200@gentoo.org
In Reply to: [gentoo-portage-dev] [RFC] Package description index file format for faster emerge search actions by Zac Medico
1 On 10/14/14 02:40, Zac Medico wrote:
2 > Hi,
3 >
4 > As we all know, emerge --search/--searchdesc actions are embarrassingly
5 > slow (from most users' perspectives, anyway), especially in comparison
6 > to external tools like eix and esearch.
7 >
8 > Wouldn't it be nice if the performance of emerge's search functionality
9 > was more competitive with other offerings? Then, external search tools
10 > might not be seen as an absolute necessity.
11 >
12 > In order to solve this problem, I suggest that we add support for a
13 > package description index file format. For example, the attached script
14 > will generate a suitable index formatted as series of lines like this:
15 >
16 > sys-apps/sandbox-1.6-r2,2.3-r1,2.4,2.5,2.6-r1: sandbox'd LD_PRELOAD hack
17 >
18 > Using this format, the index file for the entire gentoo-x86 repository
19 > consumes approximately 1.5 MB. The whole file can be quickly searched as
20 > a stream (the whole file need not be in memory at once), yielding emerge
21 > --search/--searchdesc performance that will be competitive with
22 > app-portage/esearch.
23 >
24 > The index can either be generated on the server side by egencache, or on
25 > the client side by a post emerge --sync hook. It makes sense to support
26 > both modes of operation, so that server side generation is purely optional.
27 >
28 > What do others think about this proposal?
29
30 Please do this. Once this is in place, I will probably deprecate
31 esearch and point users to emerge for basic searching and eix for
32 advanced searching.
33
34 Regards,
35 Paul

Replies