Bundle provider: cut the per-file metadata calls of the filesystem walk (Windows ×2.3 on flat bundles)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp
- Domain
- backend, performance
Research direction
Read CLAUDE.md and inspect Walk, the ReparsePoints seam, Enumerate, GetVersion, and Read; the issue compares three optimization options but does not identify their file paths. Start by reproducing the flat bundle measurements on Linux and Windows, then trace metadata calls per file. Done means implementing and validating a chosen approach that reduces those calls while preserving the stated fail-closed behavior and version token semantics.
Written by the indexing model from the issue text.
Description
Follow-up of lot A (#139, PR #207), after the per-scope directory memo (#205).
Measured (independent differential, median of 3 runs, origin/dev 32a48bc → branch):
| Bundle | Verb | Linux | Windows |
|---|---|---|---|
| 3 000 flat concepts | validate |
188 → 250 ms | 501 → 1 142 ms |
| 3 000 flat concepts | info |
117 → 182 ms | 449 → 1 052 ms |
acme_retail |
validate |
71 → 94 ms | 114 → 138 ms |
Cost is linear, with a constant of roughly ten metadata calls per file: Enumerate and GetVersion each walk the tree (per entry: ReparsePoints.Inspect = attributes + link target, Directory.Exists/File.Exists, a FileInfo for the length), then every Read re-inspects the leaf (STRICT) before opening it.
Options
- In
Walk, take the reparse flag and the file/directory kind from theFileSystemInfoentries the enumeration already returns (Attributes,LinkTargetare populated by the enumerator without extra syscalls on Windows) instead of re-inspecting each entry. Touches theReparsePointsseam and the rule that the walk is one of the four lenient sites (CLAUDE.md): needs its own argument that an entry whose attributes could not be read is still treated fail-closed where a guard needs it. - Make
GetVersionreuse the listing ofEnumeratewithin one scope (lengths and mtimes are already read by the walk), halving the walks per load. Changes what the weak version token covers only if the two walks no longer observe the same moment — which is arguably more correct. - Skip re-inspecting the leaf in
Readwhen the same scope already inspected it during the walk (the window grows from one call to one scope, as for the name memo).
Not in scope: the exact-name memo (done, #205).
- Dominant language
- C#
- Stars
- 4
- Forks
- 1
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 32
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jchable/okf4net
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
.NET bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
test
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area/backend type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
umbraco/Umbraco-CMS#24668 · 1 comment ·
Maintainers usually reply within 1 day
-
Pri3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MicrosoftDocs/windows-dev-docs#6205 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
area-ai untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dotnet/extensions#7956 ·
Maintainers usually reply within 1 day