1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

* Huge reduction in memory use (2/3 or so on large nix-env -qas

operations): share ATermMaps between DrvInfos.
This commit is contained in:
Eelco Dolstra 2006-05-02 17:12:03 +00:00
parent 11ae2d1e7a
commit b52e711910
3 changed files with 12 additions and 9 deletions

View file

@ -348,6 +348,7 @@ static void queryInstSources(EvalState & state,
assertStorePath(*i);
DrvInfo elem;
elem.attrs = shared_ptr<ATermMap>(new ATermMap()); /* ugh... */
string name = baseNameOf(*i);
unsigned int dash = name.find('-');
if (dash != string::npos)