Skip to content
Snippets Groups Projects
  1. Oct 19, 2016
  2. Oct 16, 2016
  3. Oct 14, 2016
  4. Oct 13, 2016
  5. Oct 12, 2016
  6. Oct 07, 2016
  7. Oct 06, 2016
  8. Oct 05, 2016
  9. Oct 04, 2016
  10. Sep 22, 2016
  11. Sep 21, 2016
  12. Sep 20, 2016
  13. Sep 16, 2016
    • Eric Litak's avatar
      0d38b4c7
    • Eelco Dolstra's avatar
      Make computeFSClosure() single-threaded again · 75989bdc
      Eelco Dolstra authored
      The fact that queryPathInfo() is synchronous meant that we needed a
      thread for every concurrent binary cache lookup, even though they end
      up being handled by the same download thread. Requiring hundreds of
      threads is not a good idea. So now there is an asynchronous version of
      queryPathInfo() that takes a callback function to process the
      result. Similarly, enqueueDownload() now takes a callback rather than
      returning a future.
      
      Thus, a command like
      
        nix path-info --store https://cache.nixos.org/ -r /nix/store/slljrzwmpygy1daay14kjszsr9xix063-nixos-16.09beta231.dccf8c5
      
      that returns 4941 paths now takes 1.87s using only 2 threads (the main
      thread and the downloader thread). (This is with a prewarmed
      CloudFront.)
      75989bdc
Loading