lix/src
Eelco Dolstra 2df9cbeb47 Provide random access to cached NARs
E.g.

  $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nars \
    /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79/share/icons/hicolor/scalable/apps/blender.svg > /dev/null
  real    0m4.139s

  $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nars \
    /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79/share/icons/hicolor/scalable/apps/blender.svg > /dev/null
  real    0m0.024s

(Before, the second call took ~0.220s.)

This will use a NAR listing in
/tmp/nars/b0w2hafndl09h64fhb86kw6bmhbmnpm1.ls containing all metadata,
including the offsets of regular files inside the NAR. Thus, we don't
need to read the entire NAR. (We do read the entire listing, but
that's generally pretty small. We could use a SQLite DB by borrowing
some more code from nixos-channel-scripts/file-cache.hh.)

This is primarily useful when Hydra is serving files from an S3 binary
cache, in particular when you have giant NARs. E.g. we had some 12 GiB
NARs, so accessing individuals files was pretty slow.
2017-12-07 01:07:07 +01:00
..
boost Shut up some warnings 2017-04-14 14:42:20 +02:00
build-remote build-remote: Fix missing log output 2017-11-25 01:34:18 +01:00
buildenv Fix "Unexpected EOF reading a line" error 2017-11-29 11:56:15 +00:00
libexpr Merge branch 'fetchGit-fast-revision-update' 2017-12-05 11:16:39 -05:00
libmain anchor nix::Exit exception 2017-11-14 12:39:30 -06:00
libstore Provide random access to cached NARs 2017-12-07 01:07:07 +01:00
libutil Propagate flags like --sandbox to the daemon properly 2017-11-21 18:50:56 +01:00
linenoise Replace readline by linenoise 2017-05-10 18:37:42 +02:00
nix Fix #1635. 2017-12-04 13:19:16 +01:00
nix-build nix-shell/nix-build: Support .drv files again 2017-11-24 18:08:35 +01:00
nix-channel Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
nix-collect-garbage printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
nix-copy-closure Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
nix-daemon Remove the remote-builds option 2017-10-24 11:00:16 +02:00
nix-env nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
nix-instantiate nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
nix-prefetch-url nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
nix-store Pass lists/attrsets to bash as (associative) arrays 2017-10-25 13:01:50 +02:00
nlohmann Simplify build by including nlohmann/json.hpp 2017-12-04 17:11:36 +01:00
resolve-system-dependencies Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00