Uh oh!
There was an error while loading. Please reload this page.
perf(detail/header): lazy + dedupe related-list fan-out, coalesce header polls - #1477
Merged
Conversation
…der polls Opening a record detail fired ~50 concurrent /api/v1 requests that head-of-line-blocked one another on the single control-plane container. Root causes, fixed at source: - RecordDetailView eagerly preloaded EVERY reverse-reference child even when the reference rail renders them (≥2 related lists) — that data was then discarded (the Related tab is hidden in that layout) while the rail re-fetched the same collections. Skip the preload when the rail owns the related lists. - The reference rail fetched every collection eagerly on mount, once per re-render. Now it (a) gates fetching on visibility via IntersectionObserver (the rail is `hidden xl:flex`), (b) caps concurrency at 3, and (c) fetches once per (parentId + entries) via a signature guard, applying results through a mounted-ref so a fetch that outlives a re-render isn't dropped. - AppHeader inbox/notification, approvals, and activity pollers re-ran several times during bootstrap (deps settling), each firing an immediate fetch — inbox/receipt ×5, activity ×3+. Added in-flight guards so the bootstrap re-runs coalesce to one request; results apply via a mounted ref. - The approvals poll now issues a single request with all identities comma-joined (pairs with the framework multi-approverId change) instead of one request per identity. Verified locally (Vite live source, cloud control-plane): opening an environment detail dropped from ~52 to ~17 requests, related collections from ×3–5 each to ×1, approvals from ×9 to ≤3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Uh oh!
There was an error while loading. Please reload this page.
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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 freeto 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.
Problem
Opening a record detail (e.g. an environment in the cloud control plane) fired ~50 concurrent
/api/v1requests that head-of-line-blocked one another on the single control-plane container, making the page feel slow.Root causes (fixed at source)
IntersectionObserver(the rail ishidden xl:flex), (b) caps concurrency at 3, and (c) fetches once per(parentId + entries)via a signature guard, applying results through a mounted-ref so a fetch that outlives a re-render isn't dropped.Verification
Local rig (Vite live source against the cloud control-plane), opening an environment detail:
/api/v1requests on open: ~52 → ~17approvals/requests: ×9 → ≤3Typecheck clean;
plugin-detail(117) andapp-shell(243) test suites pass.Deploy note
The approvals client change pairs with the framework multi-approverId endpoint — bump the cloud
.framework-shaand.objectui-shatogether.🤖 Generated with Claude Code