Skip to content

perf(web): load space and folder pages in fewer database round trips - #3105

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:perf/r2-web-dashboard
Oct 24, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:perf/r2-web-dashboard

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

RetriggerView in GreptileConfidence 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.

  • Space and organization pages load their independent data reads together.
  • Folder video lists load sharing details and organization settings together.
  • Space-or-organization lookups run both database selects together.

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

@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Oct 24, 2026 2:23pm UTC

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 24, 2026 14:23 Inactive
@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown
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.

@richiemcilroy
richiemcilroy merged commit 12ee63a into CapSoftware:main Oct 24, 2026
33 of 35 checks passed
@yashranaway
yashranaway deleted the perf/r2-web-dashboard branch October 24, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants