about summary refs log tree commit diff
path: root/src/libstore/nar-accessor.cc
AgeCommit message (Collapse)AuthorFilesLines
2017-12-07 Provide random access to cached NARsEelco Dolstra1-75/+118
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 nix ls-{nar,store}: Return offset of files in the NAR if knownEelco Dolstra1-4/+6
E.g. $ nix ls-store --json --recursive --store https://cache.nixos.org /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79 \ | jq .entries.bin.entries.blender.narOffset 400
2017-11-14 nix ls-{nar,store}: Don't abort on missing filesEelco Dolstra1-1/+1
2017-11-14 nix ls-{nar,store} --json: Respect -REelco Dolstra1-3/+7
2017-11-14 nix ls-{store,nar}: Add --json flagEelco Dolstra1-0/+33
2017-07-30 Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim1-5/+5
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-05-15 nar-accessor.cc: remove unused member NarIndexer::currentNameBenno Fünfstück1-2/+1
2017-05-15 nar-accessor: non-recursive NarMember::findBenno Fünfstück1-21/+21
This avoids a possible stack overflow if directories are very deeply nested.
2017-05-15 nar-accessor: use tree, fixes readDirectory missing childrenBenno Fünfstück1-33/+76
Previously, if a directory `foo` existed and a file `foo-` (where `-` is any character that is sorted before `/`), then `readDirectory` would return an empty list. To fix this, we now use a tree where we can just access the children of the node, and do not need to rely on sorting behavior to list the contents of a directory.
2016-12-08 Fix warning on 32-bit systemsEelco Dolstra1-1/+2
http://hydra.nixos.org/build/44628517
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-4/+4
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-4/+4
2016-08-10 NarAccessor: Fix handling of non-executable filesEelco Dolstra1-1/+1
2016-03-15 Fix Darwin buildEelco Dolstra1-2/+2
http://hydra.nixos.org/build/33279996
2016-02-26 Remove bad assertionEelco Dolstra1-1/+0
2016-02-25 Add NAR / Store accessor abstractionEelco Dolstra1-0/+142
This is primary to allow hydra-queue-runner to extract files like "nix-support/hydra-build-products" from NARs in binary caches.