Repository navigation
perf: lighter, faster Studio with the same scene - #177
Merged
Merged
Conversation
- Server: walk each Run tree once per poll; plain entries under a realpath-checked run dir are in scope by construction, every symlink still goes through contextPath. Poll with 28 projects 68 -> 12 ms, realpath/lstat 3266/1083 -> 398/127, idle server CPU ~4x lower. - Static files: in-memory cache keyed by size+mtime, ETag with no-cache revalidation (304 on reload), brotli/gzip for files >= 1 KiB. First load 990 KB -> 238 KB, reload ~7 KB. - Client: start loading the kitchen module at boot, drop the throwaway WebGL probe context (three's own failure path still falls back to the flat ring), allocation-free procedural texture loops with a per-session pixel cache (same bytes), skip shader info-log reads. First kitchen frame 1924 -> 1663 ms median. - Report with before/after numbers and parity screenshots: docs/audit/studio-perf-2026-11.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Makes AEL Studio lighter and faster while keeping the same scene, look and interactions. Full report with before/after tables and side-by-side screenshots:
docs/audit/studio-perf-2026-11.md.Before / after (28-project fixture)
/api/projectsin pageChanges
lib/studio/summary.js: each Run tree is walked once per summary. A plain entry under a realpath-checked run dir is in scope by construction. Every symlink still goes throughcontextPath. New test covers a nested escaping symlink and the single walk.lib/studio-server.js: static files are served with an ETag andno-cache(304 on revalidate), plus brotli/gzip for files of 1 KiB or more, from an in-memory cache keyed by size and mtime. Auth runs before the cache check. API staysno-store.studio/js/main.js: the kitchen module starts loading at boot, and the throwaway WebGL probe context is gone (if three cannot create a context, the page still falls back to the flat ring).studio/js/forms.js: texture loops no longer allocate per pixel, and pixels are cached per session. The bytes match v3.0.0 (a test pins the hash).studio/js/restaurant.js:renderer.debug.checkShaderErrors = false.Measured and not kept
Texture workers made the first frame slower. An off-screen pause never fires because the layout never scrolls the kitchen out of view. The report also covers tree-shaking, merging, shadow gating and adaptive DPR, with the reasons each was dropped.
Parity
Pixel diffs at desktop and 375px, light and dark, including the zoomed station and the Details sheet: kitchen pixels are identical. The only changes are in the elapsed-time text, which crossed a minute boundary between captures.
Checks
npm test(907/907),npm run check:skills,npm run audit:package,npm run measureall green.🤖 Generated with Claude Code