about summary refs log tree commit diff
path: root/tests/nar-index.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-26T15·21+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-26T15·29+0200
commit57b95057311d4dafb948c78889693a98ec349460 (patch)
tree7757591822f2e1a7bc053fbb27badfa35c5aa5fe /tests/nar-index.sh
parent4c9ff89c261d84dcc4f88a79654daff2f4790e66 (diff)
nix search: Add a cache
The package list is now cached in
~/.cache/nix/package-search.json. This gives a substantial speedup to
"nix search" queries. For example (on an SSD):

First run: (no package search cache, cold page cache)

  $ time nix search blender
  Attribute name: nixpkgs.blender
  Package name: blender
  Version: 2.78c
  Description: 3D Creation/Animation/Publishing System

  real    0m6.516s

Second run: (package search cache populated)

  $ time nix search blender
  Attribute name: nixpkgs.blender
  Package name: blender
  Version: 2.78c
  Description: 3D Creation/Animation/Publishing System

  real    0m0.143s
Diffstat (limited to 'tests/nar-index.sh')
0 files changed, 0 insertions, 0 deletions