store: Cache `add-text-to-store' results.
authorLudovic Courtès <ludo@gnu.org>
Tue, 29 Jan 2013 22:53:09 +0000 (23:53 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 29 Jan 2013 23:09:32 +0000 (00:09 +0100)
commitbdcf35a6b294c1db7ce78a5550ba51e067863069
treef34dd05a0007348f2371a495398620b274f86b46
parent2c3f47ee3a621f20d24ae5c78b1abc0eb00ba445
store: Cache `add-text-to-store' results.

* guix/store.scm (<nix-server>)[atts-cache]: New field.
  (add-text-to-store/cached): New procedure.  Use it as a wrapper around
  `add-text-to-store'.
  When running "guix-build gdb", this reduces the number of RPCs from
  3048 to 289, and execution time from 4.7s to 2.6s.
guix/store.scm