Repository navigation
GEN-2154 Reduce authenticated data-loading waterfalls - #204
Merged
Merged
Conversation
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.
Authenticated pages repeatedly validate cookie membership and pay unnecessary PostgreSQL/browser waterfalls. This change reduces Jobs data reads from
1 + 2Nto three, batches integration and execution-target reads, starts independent run metadata reads together, and renders runs directly from a run response containing the current job name. Existing Jobs payloads and live refresh/mutation behavior are preserved.Server-Timingauthorization/application phases to authenticated HTML and protected API responses. Cookie signature/expiry validation stays in the Worker; authoritative owner, verified-email, tenant and session-version validation runs once in the service. OAuth and bearer-token checks remain enforced.job_namefield via the existing OpenAPI generation workflow, with API boundary, authorization, PostgreSQL query-count, parallel-read, and browser refresh regression tests.Validation: clean
npm ci; full rootnpm run checkwith disposable PostgreSQL: 375 passed, 8 opt-in tests skipped, generated OpenAPI/API boundaries, type checks, and Worker dry-run builds. Chromium cookie benchmarks passed sequentially before/after against default-branchdaf766eusing the same ten-job fixture and controlled 20 ms/query delay. Endpoint medians: Jobs 174→106 ms; run detail 179→80 ms; Integrations 280→51 ms. Browser results for all requested screens, ranges, production-proxy baseline, local query plans and reproduction instructions are inpackages/app/performance/GEN-2154.md.These are controlled local measurements, not production savings or p95 estimates. Browser variance remains substantial. Request-owned pool/socket lifecycle, production index selection, caching and placement remain unchanged pending real Worker/production evidence; the report identifies those remaining costs and follow-up measurement steps.
Linear: https://linear.app/generation/issue/GEN-2154/reduce-site-wide-data-loading-latency-and-database-request-waterfalls