Conversation
Reduce whole-tree startup work across the path-store tree controller and store setup. This combines the kept changes that removed duplicate controller metadata passes, made projection data lazy/partial, deferred child lookup maps, optimized initial expansion handling, and added file-only builder fast paths for the profile workload. Experiments: #2, #3, #4, #5, #7, #8, #9, #10, #11, #12, #13, #14, #21, #23, #28, #29 Metric: visible_rows_ready_ms 1002.3 → 197.5 (-80.3%)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e06b9a8aa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| previousChildOffsets.length = resolvedDepth; | ||
| previousNodeIds.length = resolvedDepth; | ||
| if (!foundDirectory) { | ||
| continue; |
There was a problem hiding this comment.
Reset shared-depth cache after unresolved expansion path
In initializeExpandedPaths, unresolved entries (!foundDirectory) still persist previousNodeIds/previousChildOffsets state before continue, so the next path may reuse sharedDepth and skip expanding ancestors that were never expanded. This causes valid later entries to be partially ignored when preceded by a stale/invalid path; for example, with paths = ['a/cab/c/c.ts'] and initialExpandedPaths = ['a/b/abc.ts', 'a/cab/c'], the store leaves a/cab/ and a/cab/c/ collapsed even though a/cab/c is valid.
Useful? React with 👍 / 👎.
| const setSizeByIndex = new Int32Array(rowCount); | ||
| for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) { | ||
| setSizeByIndex[rowIndex] = childCount[parentRowIndex[rowIndex] + 1] ?? 0; | ||
| } |
There was a problem hiding this comment.
Compute setSize from full sibling counts when projection is capped
When maxRows truncates projection generation, setSizeByIndex is computed from childCount that only includes visited rows, so sibling counts are understated for early rows. This leaks into tree ARIA metadata during startup (the controller requests a capped projection), e.g. with 1000 visible root items and maxRows=512, the first row reports setSize=512 instead of 1000.
Useful? React with 👍 / 👎.
Reduce whole-tree startup work across the path-store tree controller and store setup. This combines the kept changes that removed duplicate controller metadata passes, made projection data lazy/partial, deferred child lookup maps, optimized initial expansion handling, and added file-only builder fast paths for the profile workload.
Experiments: #2, #3, #4, #5, #7, #8, #9, #10, #11, #12, #13, #14, #21, #23, #28, #29
Metric: visible_rows_ready_ms 1002.3 → 197.5 (-80.3%)