Gentoo Archives: gentoo-portage-dev

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

Attachments

File name MIME type
make_pkg_desc_index.py text/x-python

Replies