Async Tree: Create a fast path for children that resolve sync #143162
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.
Ref #140883
In my testing a folder with 50k nested files (
touch {1..10000}.{js,map,ts,d.ts,jsx}
) would render in ~3s with nesting off and 15s with it on. Profiling showed the bulk of this overhead was in creating/cancelling a ton of different timeouts for "slow element" states, and general Promise handling logic.In the nesting case the children are known synchronously so all the Promise/timeout overhead is not needed. 079a688 creates a fast path for this case in explorer land to get the render time down to 10s, this PR extends that fast path into AsyncTree land to bring render time down to 5s.