Skip to content

Release cached embed tracks: revalidate proxied archives instead of downloading them again - #874

Closed
nulltask wants to merge 5 commits into
mainfrom
devel
Closed

nulltask wants to merge 5 commits into
mainfrom
devel

Conversation

@nulltask

Copy link
Copy Markdown
Owner

Summary

🤖 Generated with Claude Code

The picture is a Pause button too, so the HUD-wide locator matched two elements and failed in strict mode.
Fix the embed play-mode e2e spec's ambiguous Pause locator
… of downloading them again

/__url-load-proxy answered no-store and dropped the upstream's validators, so every embed ?track= (and player ?music=) load from another origin downloaded the whole archive. Move the proxy into url-load-proxy.ts, answer no-cache, and pass ETag / Last-Modified and If-None-Match / If-Modified-Since through, so an unchanged archive comes back as a 304.
Cache proxied embed tracks until the archive changes
@nulltask

Copy link
Copy Markdown
Owner Author

Closing: this release will go out together with the embed AUTO checkbox.

@nulltask nulltask closed this Oct 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Exports Benchmark

🔴 2 regressions · 2 improvements · 12 within noise · 879 compared

46764827 → 188f6456 · 3 runs base / 3 runs head · a regression or improvement is a change past ±8% whose runs do not overlap · times are per call (median)

Regressions (2)

API Base Head Change Run spread (base / head)
skin-beatoraja.scene.createBeatorajaJudgeStateGraph 2.36 µs 5.00 µs 112.0% slower ±31.5% / ±11.2%
chart-writer.stringifyBMS 41.6 µs 50.3 µs 20.8% slower ±1.6% / ±8.9%

Improvements (2)

API Base Head Change Run spread (base / head)
chart-editor.addNote 6.78 µs 5.39 µs 20.5% faster ±0.9% / ±8.5%
skin-lr2.state.resolveLR2CourseStageDifficultyOps 149 ns 127 ns 15.3% faster ±12.5% / ±0.2%
Within noise (12): past the threshold, but the runs overlap
API Base Head Change Run spread (base / head)
player-browser.setMasterVolume 637 µs 482 µs 24.4% faster ±42.3% / ±7.0%
chart-model.getPlayModeLayouts 11.0 ns 15.5 ns 41.3% slower ±13.1% / ±37.5%
chart-editor.listNotes 4.16 µs 5.68 µs 36.5% slower ±0.5% / ±19.0%
chart-parser.resolveBMSControlFlowWithDraws 6.82 µs 5.45 µs 20.1% faster ±1.2% / ±14.0%
chart-editor.setMetadata 5.07 µs 6.33 µs 24.9% slower ±9.6% / ±20.0%
skin-beatoraja.scene.resolveBeatorajaFrameTimers 68.7 ns 84.5 ns 22.9% slower ±14.7% / ±6.2%
player-browser.createDecideScene 275 µs 313 µs 13.8% slower ±6.4% / ±3.8%
skin-beatoraja.normalizeBeatorajaJudgeGraphs 66.4 ns 74.7 ns 12.4% slower ±6.3% / ±7.0%
player-engine.replay.resolveRulesetResultLamp 41.0 ns 46.1 ns 12.4% slower ±6.0% / ±7.0%
player-browser.ChartPreviewEngine 218 ns 241 ns 10.6% slower ±33.4% / ±5.4%
player-engine.createTempoClock 741 ns 813 ns 9.7% slower ±5.3% / ±14.3%
player-browser.BrowserChartCollectionStore 319 µs 294 µs 8.0% faster ±3.8% / ±7.2%
I/O-bound, not judged (19)

These cases touch the filesystem, so their time follows the OS cache and the disk more than the code.

API Base Head Change Run spread (base / head)
chart-audio-renderer.renderChartFile 6.17 ms 6.18 ms 0.2% slower ±6.2% / ±4.6%
chart-audio-renderer.renderJSON 3.88 ms 3.77 ms 2.9% faster ±4.1% / ±3.5%
chart-audio-renderer.renderSingleSample 8.14 µs 8.05 µs 1.2% faster ±0.6% / ±1.5%
chart-audio-renderer.writeAudioFile 201 µs 168 µs 16.4% faster ±14.3% / ±9.2%
chart-editor.exportChart 201 µs 233 µs 15.6% slower ±14.3% / ±7.8%
chart-editor.importChart 115 µs 126 µs 9.9% slower ±9.0% / ±4.8%
chart-editor.loadJSONFile 147 µs 146 µs 0.5% faster ±3.1% / ±1.5%
chart-editor.saveJSONFile 203 µs 253 µs 24.9% slower ±7.9% / ±24.2%
chart-parser.parseChartFile 131 µs 125 µs 5.0% faster ±4.2% / ±4.5%
player-browser.readFilesIntoBytesMap 4.71 µs 4.58 µs 2.8% faster ±2.1% / ±0.4%
player-terminal.createBgaANSIRenderer 3.37 µs 3.37 µs ±0.0% ±2.5% / ±0.4%
player-terminal.loadStageFileANSIImage 101 ns 101 ns 0.1% slower ±0.6% / ±0.6%
player-terminal.loadStageFileANSILines 165 ns 164 ns 0.9% faster ±0.4% / ±1.2%
player-terminal.loadTerminalANSIImage 1.03 ms 1.02 ms 0.8% faster ±0.9% / ±2.2%
shared-utils.createFileLogger 203 µs 205 µs 0.9% slower ±0.7% / ±1.9%
shared-utils.readFilesIntoEntryMap 2.35 µs 2.30 µs 2.0% faster ±1.2% / ±0.0%
shared-utils.resolveFirstExistingPath 85.6 µs 89.9 µs 5.1% slower ±2.3% / ±0.4%
shared-utils.workerize.workerize 10.9 ms 11.3 ms 3.0% slower ±1.7% / ±3.0%
skin-beatoraja.readFilesIntoBytesMap 19.1 µs 19.0 µs 0.7% faster ±0.9% / ±1.2%
Excluded: too fast to time (83)

A timed sample lasted 1 µs or less on at least one side (usually a base commit from before calls were batched), so its time is timer noise and no change is shown.

API Base Head
chart-model.createMeasureBoundariesBeats 72.0 ns 72.0 ns
chart-model.mirrorBeatAtTempoReversal 6.22 ns 6.35 ns
chart-model.parseBmsARGB 272 ns 264 ns
chart-model.parseBMSExBMP 608 ns 608 ns
chart-model.resolveChartMainBPM 109 ns 107 ns
chart-source.parseBmsonSubartist 61.3 ns 61.1 ns
player-browser.applyBeatorajaStretchRect 31.3 ns 32.0 ns
player-browser.checkBrowserCompat 170 ns 170 ns
player-browser.createDrawnRandomMixEntry 16.8 ns 19.3 ns
player-browser.createNewCourseEntry 13.3 ns 9.90 ns
player-browser.createRandomMixEntry 13.7 ns 13.3 ns
player-browser.destinationToSpriteProps 86.4 ns 87.2 ns

…and 71 more.

Run details
Measure Value
Median change (all compared cases) -0.19%
Mean change -0.52%
Overall verdict (median vs. threshold) unchanged
Compared / within noise / I/O-bound / unchanged 879 / 12 / 19 / 844
Benchmarked / skipped (head) 962 / 38
Time / warmup per case 50 ms / 25 ms
Node / platform v26.12.1 / linux

This branch was successfully deployed

1 active deployment
preview — 188f6456 Deployed Oct 31, 2026 by nulltask via deploy #154
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.

1 participant