Improve mount performance by moving validation to mount process and parallelizing I/O#1908
Open
tyrielv wants to merge 4 commits intomicrosoft:masterfrom
Open
Improve mount performance by moving validation to mount process and parallelizing I/O#1908tyrielv wants to merge 4 commits intomicrosoft:masterfrom
tyrielv wants to merge 4 commits intomicrosoft:masterfrom
Conversation
Move authentication, server config query, version validation, cache health checks, git config settings, and enlistment logging from the mount verb (gvfs.exe) into the mount process (gvfs.mount.exe). This eliminates duplicate work (auth and index parsing were done in both processes) and reduces mount time from ~40s to ~22s. The verb now only does: disk layout upgrade check, ProjFS attach, enum arg validation, mount exe existence check, launch + wait. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Start auth + config query immediately on entry to Mount(), before repo metadata loading. This overlaps network latency with all local I/O: metadata, git version/hooks/filesystem checks, and git config writes. The network task (auth + config) and local task (validations + git config) run concurrently via Task.WhenAll. RepoMetadata loading runs on the main thread between task launch and local task start, overlapping with the initial anonymous auth probe. Measured improvement on os.2020 (2.4M index entries): Production: ~29s wall clock Sequential: ~22s (prior commit moved work to mount.exe) Parallel: ~19s (this commit) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4e6996d to
80aa37a
Compare
Add TryInitializeAndQueryGVFSConfig to GitAuthentication that merges the anonymous probe, credential fetch, and config query into a single flow, making at most 2 HTTP requests (or 1 for anonymous repos) and reusing the same TCP/TLS connection. Refactor TryInitialize to delegate to the combined method, eliminating the duplicated TryAnonymousQuery logic. Add TryAuthenticateAndQueryGVFSConfig to GVFSVerb and update CloneVerb, PrefetchVerb, and CacheServerVerb to use it, replacing the two-step TryAuthenticate + QueryGVFSConfig pattern with a single call. Remove the now-unused QueryGVFSConfigWithFallbackCacheServer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
80aa37a to
2d48281
Compare
c715fa3 to
129adcd
Compare
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.
Problem
gvfs mount was slower than necessary because gvfs.exe performed substantial validation before launching gvfs.mount.exe, and then the mount process repeated some of it:
On a large repo (~2.4M index entries), production mount took ~29s.
Three incremental commits
Testing
All unit tests and CI functional tests pass; manual mount/unmount verified on large repo.