summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-10-27 10:24:44 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-10-27 10:24:44 +0000
commitf09618b63a3e842adc59360c9bb4cf0ad37246ef (patch)
treeb7e3a046793b8adfca9b50187ccf626635e79fd6
parentc7bea941b04710b4a4f1b64c1274207d355633dd (diff)
downloadguix-f09618b63a3e842adc59360c9bb4cf0ad37246ef.tar.gz
* Turn on read-only mode in queries. This prevents redundant store I/O.
-rw-r--r--src/nix-env/main.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index f87c413126..c25cdb60ca 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -516,6 +516,8 @@ static void opQuery(Globals & globals,
 
     enum { sInstalled, sAvailable } source = sInstalled;
 
+    readOnlyMode = true; /* makes evaluation a bit faster */
+
     for (Strings::iterator i = opFlags.begin();
          i != opFlags.end(); ++i)
         if (*i == "--status" || *i == "-s") printStatus = true;