Repository navigation
perf(web): load space and folder pages in fewer database round trips - #3105
Merged
richiemcilroy merged 2 commits intoOct 24, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
|
@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
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.
the space, org and folder pages ran independent db reads one after another: members, then videos, then sharing, then org settings. and the space-or-org lookup that every space page goes through used Effect.all without concurrency, so its two selects ran in sequence too, same thing #2216 fixed in canView. now the independent reads start together and only the sharing lookup waits on the video ids. same queries, same count, same auth order.
measured with the repo's mocked drizzle proxy and a simulated 20ms per query, since there's no real db here: space page 4 to 2 round trips (98 to 57ms), org page 3 to 2 (75 to 50ms), folder videos 4 to 2 (90 to 49ms), plus one trip off every space lookup. rendered props are byte identical before and after. the new test counts round trips and fails on the old code.


Confidence Score: 5/5
The PR appears safe to merge.Summary
The PR starts independent database reads together while keeping sharing reads dependent on the returned video IDs.
No actionable issues found. Review was based on code inspection; tests were not run.
Reviews (1) · Last reviewed commit: "perf(web): load space and folder pages i..." · Reviewed by Greptile