1 |
Currently vardbapi.aux_get only works for a subset of all auxdbkeys, as |
2 |
some like KEYWORDS or DESCRIPTIOn aren't stored in vdb directly. |
3 |
They are however stored in environment.bz2, but not accessible |
4 |
there. |
5 |
This is unintuitive and limits tools like equery or my own auxget |
6 |
and metascan tools in their usability. |
7 |
|
8 |
There are two solutions to this problem: |
9 |
a) enhance vardbapi.aux_get so it can use environment.bz2 |
10 |
b) store more keys in vdb |
11 |
|
12 |
Now there is a tradeoff to made: a) doesn't need space but is slow |
13 |
while b) is fast but needs space, both in non-trivial amounts (runtime |
14 |
increased from 1s to 9s for a metascan -i run and from 0.5s to 0.8s |
15 |
for auxget -i, haven't actually checked the size increase, expect |
16 |
somewhere between 1 and 10 megabytes on a typical install). |
17 |
|
18 |
I'm attaching a patch that implements both (each in it's own hunk) as |
19 |
well as a new emaint option to create the missing entries offline. |
20 |
|
21 |
A not so obvious issue with a) is that due to the recent |
22 |
storage optimizations (empty entries not being stored) it's worse than |
23 |
I originally expected, as any entry missing a file will be looked up in |
24 |
env.bz2 instead. Only way to avoid that would be to add special casing |
25 |
in aux_get which I really dislike. |
26 |
|
27 |
Opinions? |
28 |
|
29 |
Marius |
30 |
|
31 |
-- |
32 |
Public Key at http://www.genone.de/info/gpg-key.pub |
33 |
|
34 |
In the beginning, there was nothing. And God said, 'Let there be |
35 |
Light.' And there was still nothing, but you could see a bit better. |