Gentoo Archives: gentoo-user

From: Vaeth <vaeth@××××××××××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Eix takes ridiculously long to update cache of overlays
Date: Sun, 22 Jul 2012 16:19:00
Message-Id: alpine.LNX.2.00.1207221754170.29262@wma7001.mathematik.uni-wuerzburg.de
1 >> I guess I'm missing some settings specific to this? I have 3 overlays
2 >> installed via layman, and this eix takes ridiculously long to index
3 >> through them, I don't know why.
4 >>
5 >> The portage tree is indexed quickly.
6 >>
7 >
8 > There is usually not much you can do there. This typically happens with
9 > overlays that contain no metadata cache.
10 >
11 > Look at your overlay directory into metadata/layout.conf. If it doesn't
12 > contain a "cache-formats" line you are probably out of luck since eix
13 > has to parse each ebuild.
14
15 It is not the "cache-formats" line which is crucial but whether
16 there is an (up-to-date) metadata/cache or metadata/md5-cache
17 subdireectory.
18 If the overlay does not have such a directory (or it is not
19 updated regularly), You can let portage generate this directory
20 by using "egencache --repo=... update".
21 You can eix-sync automatically call this at every think
22 (see the example lines for eix-sync in the eix manpage).
23
24 > The default method for overlays is "parse|ebuild*" meaning that if there
25 > is a cache, it will be used and double-checked with a fast parser
26 > ("parse"). If there is no cache, the parser will be used alone. If that
27 > does not give satisfying results (e.g. because variables are set in
28 > eclasses instead of ebuilds), the real ebuild parser (i.e. bash) will be
29 > used to parse them ("ebuild*").
30
31 Almost: CACHE_METHOD_PARSE is appended to the default method.
32 Thus, the actual default method for overlays is something like
33 "parse|ebuild*#metadata-md5#metadata-flat#assign"
34 The choices after "#" are various cache methods; if the corresponding
35 cache is available, this method is used (in the specified order),
36 if they fail then "parse" is used (which is a fast parser, as you
37 mentioned, but not reliable) and if that does not give a satisfying
38 result then the real ebuild parser is used (which is very slow).
39 An alternative way to speed up eix is to remove the "|ebuild*"
40 in the overlay cache method: This means that eix will take
41 the result of "parse" even if it is not perfect. Of course, this
42 gives some "wrong" information (e.g. wrong SLOT name, missing
43 dependency information, etc.)
44
45 > Things might get better if they ever get libbash [1] finished.
46
47 I do not think that eix will be using it - it would be a lot
48 of work and only slightly improve the heuristics (main issue
49 are that inheriting eclasses currently requires some "wrapper"
50 interaction, so this cannot be solved with libbash alone.)
51 Perhaps some day portage might use libbash in "egencache", but
52 egencache is already surprisingly fast:
53
54 > If you need to update the eix cache on several systems, it might be
55 > faster to generate a cache on one machine and distribute it to all
56 > other. See `man egencache`.
57
58 Actually, egencache is already *much* faster than parsing each ebuild
59 separately. Moreover, I guess at least with cache-format=md5-dict
60 it parses really only those ebuilds for which the md5 checksum has
61 changed (i.e. the first execution might be slow, but after updates
62 there is not so much delay, usually).

Replies

Subject Author
Re: [gentoo-user] Eix takes ridiculously long to update cache of overlays Florian Philipp <lists@×××××××××××.net>