perf(client): quick-win settings — discrete GPU, faster quality ramp-up#28
Open
RZDESIGN wants to merge 1 commit intohytopiagg:mainfrom
Open
perf(client): quick-win settings — discrete GPU, faster quality ramp-up#28RZDESIGN wants to merge 1 commit intohytopiagg:mainfrom
RZDESIGN wants to merge 1 commit intohytopiagg:mainfrom
Conversation
Three small tuning changes with outsized user-facing impact: 1. WebGLRenderer powerPreference: 'high-performance' On dual-GPU laptops (most gaming laptops) browsers default to the integrated GPU. This hint requests the discrete GPU, giving an immediate frame-rate boost at zero runtime cost. 2. Quality warmup 10 s → 5 s After joining a world the auto-scaler waits before it begins upgrading quality. 10 seconds is overly conservative — 5 s is enough for the heavy init work to settle while letting players on capable hardware reach higher quality sooner. 3. Quality-up threshold 5 s → 3 s Once the scaler starts, it previously required 5 s of sustained high FPS before upgrading. 3 s still guards against oscillation but lets the client converge on the right quality tier roughly 40 % faster. Made-with: Cursor
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.
Summary
Three tiny tuning changes (3 lines total) that improve perceived and actual performance for a large portion of players:
1.
powerPreference: 'high-performance'—Renderer.tsMost gaming laptops ship with dual GPUs (integrated + discrete). Browsers default to the power-saving integrated GPU unless the WebGL context explicitly requests otherwise. Adding
powerPreference: 'high-performance'to theWebGLRendererconstructor hints the browser to prefer the discrete GPU, giving an immediate frame-rate boost on dual-GPU systems at zero runtime cost.2. Quality warmup 10 s → 5 s —
SettingsManager.tsAfter joining a world, the dynamic quality auto-scaler waits a warmup period before it starts upgrading quality, to avoid reacting to the heavy initialization work. 10 seconds was overly conservative — heavy init typically settles within 2–3 seconds. Reducing this to 5 s lets players on capable hardware reach their optimal quality tier sooner, making the game feel faster to load.
3. Quality-up threshold 5 s → 3 s —
SettingsManager.tsOnce the warmup is over, the scaler requires sustained high FPS before it upgrades quality. Previously it waited 5 s; reducing to 3 s still guards against up/down oscillation (the downgrade threshold remains at 3 s, and there's a separate cooldown) but lets the client converge on the right quality tier roughly 40% faster.
Changes
client/src/core/Renderer.tspowerPreference: 'high-performance'toWebGLRendereroptionsclient/src/settings/SettingsManager.tsQUALITY_ADJUSTMENT_WARMUP_TIME: 10 → 5client/src/settings/SettingsManager.tsQUALITY_UP_TIME_THRESHOLD: 5 → 3Risk Assessment
Test Plan
renderer.infoor browser GPU internals)