Repository navigation
Spike: reuse unchanged projection ancestor names - #2137
Draft
Tyrie Vella (tyrielv) wants to merge 1 commit into
Draft
Tyrie Vella (tyrielv) wants to merge 1 commit into
Tyrie Vella (tyrielv) wants to merge 1 commit into
Conversation
Retain complete directory-name components before the version-4 index replacement boundary. Reset reusable path state at skipped entries and new parses. Preserve reuse across projected merge-stage transitions. Add allocation and projection regression tests, plus a read-only snapshot benchmark with tree fingerprints and memory and latency measurements. Keep read-only file access inside the benchmark and preserve repair access. The isolated NativeAOT benchmark retains less managed memory, but startup private commit increases. Keep the existing pool allocation and shrink policies unchanged. Assisted-by: GPT-6.1 Sol Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Tyrie Vella (tyrielv)
force-pushed
the
tyrielv/projection-name-memory-vnext
branch
from
October 16, 2026 19:52
59f3b51 to
2698852
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 and Context
The version-4 index parser reuses path components when consecutive files share a parent.
When the parent changes, it allocates names for every component.
Folder lookup often finds existing ancestors, but the pools retain those temporary names.
Large indexes therefore retain many names that no persistent tree node needs.
This draft measures ancestor-name reuse without changes to file-backed projection or enlistment lifecycle.
The prototype reduces retained managed memory.
It does not establish a startup-private-commit improvement: the isolated NativeAOT benchmark reports higher startup commit and fragmentation.
Changes
ReplaceIndex.GVFS.PerfProfiling.It reports pool use, memory, build times, lookup and enumeration latency, and complete-tree fingerprints.
Measurements
Both variants use the same index, query corpus, benchmark code, and vnext base.
Measurements use Release ARM64, NativeAOT, and .NET 10.0.12.
Each variant ran in three separate processes with five rebuilds per process.
The table shows medians.
All measured trees contain 2,448,066 files and 377,749 folders.
The baseline and prototype produce the same fingerprint across first builds and final rebuilds.
These results describe an isolated projection, not a complete mount.
Forced GC affects only the benchmark process.
No size database is present.
First-pass queries do not imply a cold OS file cache.
The first-build timing ranges overlap, so these samples do not establish a statistically significant timing difference.
Run-to-run variation is large, and the measurements do not establish a consistent timing benefit.
The startup-private-commit cost remains a limitation of this prototype.
Known gaps and deliberate decisions