Repository navigation
Make computeFSClosure() much faster over SSH - #539
Merged
Merged
Conversation
This is intended to allow a store to query multiple paths in a single call. Taken from #523. Assisted-by: Claude Fable 5 <noreply@anthropic.com>
Add a batched QueryPathInfos operation to the worker protocol, gated behind a new "queryPathInfos" protocol feature, and use it to implement an efficient RemoteStore::queryPathInfos() override. Previously, querying path infos from a remote store required a network round-trip per store path, which is extremely slow over high-latency links (e.g. in computeFSClosure()). Now the entire set of paths is sent in a single operation. The response contains the infos for the valid paths; paths not reported are invalid. The client answers what it can from the in-memory path info cache first, updates the cache with the results (including negative entries), and falls back to the per-path base implementation for daemons that don't support the new operation. Assisted-by: Claude Fable 5 <noreply@anthropic.com>
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
cole-h
approved these changes
Jul 7, 2026
1 of 7 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This adds a new
QueryPathInfosoperation to theRemoteStoreprotocol to query multiple store paths at once. It's based on the newqueryPathInfos()API from #523.It cuts the runtime of
nix-store --store 'ssh-ng://root@127.0.0.1' -qR /nix/store/65k3ks18q0g1wq8c0hm6g1xsya3c5k1g-foo.drv(a 10432-path NixOS system closure, where the loopback interface has an artificial 10ms latency) from 119.7s to 2.0s.Context