Repository navigation
Conversation
…ched fetches OncoPrint (lib/oncoprint.ts, lib/oncoprint-assemble.ts): - buildContract meets each column id once, in a per-study map, and hands the new assembleIndexed rows by column position. assembleContract keeps the id-keyed interface (CLI, local tables, Python conformance) as an adapter onto it. Assembly at 166k patients 2.1-2.6s -> 0.6-0.7s; at 409k 5.4-7.0s -> 1.7-2.2s. The hottest loops are their own functions, so V8 optimises them whole. - Every study's fetches start together: clinical tracks, heatmaps, overlays, derived rows and the driver annotation no longer wait for the alterations. The annotation reuses the cached OncoKB pin and reads only driver rows. - Whole-study fetches (alterations, coverage, profiled-for, clinical, every column) take a list of studies and run one statement per batch (batchStudies: small studies share one up to 25,000 samples, a large one keeps its own). 312 studies 14.7-17.4s -> 4.5-5.6s. - Panel coverage computes each panel's mask before joining samples. Plots and the analysis: - A pooled box skips the point fetch when its own count is past the cap (exact), and checks every study's axes up front instead of as a side effect of that fetch: a refusal at 312 studies 3.2-6.2s -> 0.7-1.2s. Coverage runs beside the second round; a single-study scatter asks for its coefficients beside its extent. - The analysis loads every study's profiles at once (studyProfilesMany) and lists import dates in one statement per connection (studiesImported): 312 queries after the views, 3.1s, gone. - A UNION ALL request per statement kind was built for plots and measured as slow as serial (as PERFORMANCE.md 3c found for the other views); not shipped. What is left is recorded in PERFORMANCE.md 3e. Verified: contracts identical to master (sha256 without timings) for 13 specs incl. heatmaps, VAF, generic assay, clustering, overlays, derived rows, merged/sample tracks, cohort groups, 409k patients and five refusals, plus both analysis-route oncoprint views; plot results equal in canonical form (master's own point order and float sums vary run to run) for 11 documents up to 50 studies and at 312. View snapshots re-recorded (queries changed); only diffexpr moved, in the 15th-17th digit of warehouse-computed sums. Full gate passes (check:portal 619/619, check:pooled 68/68, e2e). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hptav8P2gBZUQtEUT6389d
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
OncoPrint and plots measured at large scale (the 52k-sample study, the 5 largest, GENIE + 5 largest at 409k patients, 50 and 312 studies) and made faster where the time actually went. The browser was never the cost: at 409k patients the binary contract decodes in <1 ms and draws in 45–107 ms.
OncoPrint, first request (engine, alternating runs against master)
buildContractnow looks each id up once and handsassembleIndexedrows by position;assembleContractkeeps its interface as an adapter (CLI, local tables, Python conformance). Hot loops split into their own functions, so V8 optimises them.batchStudies): small studies share a statement up to 25,000 samples; a big study keeps its own (one statement over six huge studies measured slower).Plots and the analysis
UNION ALLrequest per statement kind — measured as slow as serial, asPERFORMANCE.md§3c found for the other views. A 312-study plot is still its own 1,248 queries (11–25 s). Two levers, both decisions rather than code:CLICKHOUSE_MAX_INFLIGHT=16(view 19.4 → 12.2 s; 32 gains nothing more), or compiling an axis for many studies in one statement (against invariant 3). Recorded inPERFORMANCE.md§3e.Verified
diffexprmoved, in the 15th–17th significant digit of warehouse-computed sums.check:portal619/619,check:pooled68/68, cohort logic, examples/method scripts, e2e.🤖 Generated with Claude Code
https://claude.ai/code/session_01Hptav8P2gBZUQtEUT6389d