Skip to content

Defer shader perf detection and reduce key-based rendering glitches#1034

Draft
ryokun6 wants to merge 3 commits intomainfrom
cursor/client-perf-shader-check-d4c7
Draft

Defer shader perf detection and reduce key-based rendering glitches#1034
ryokun6 wants to merge 3 commits intomainfrom
cursor/client-perf-shader-check-d4c7

Conversation

@ryokun6
Copy link
Copy Markdown
Owner

@ryokun6 ryokun6 commented Apr 5, 2026

What

  • Avoids running GPU/WebGL capability detection during module import / first paint.
  • Stabilizes a couple list keys that could cause React to reuse the wrong element when lists change.
  • Reduces Karaoke lyric overlay re-renders by decoupling high-frequency elapsedTime from the provider context.

Why

  • checkShaderPerformance() creates a WebGL renderer; doing that at import time can jank first render and can be problematic in non-browser contexts.
  • Index keys can manifest as subtle rendering bugs (wrong item reused) when arrays can reorder or be edited.
  • React Scan showed Karaoke re-rendering large UI surfaces during playback; the provider context previously changed every tick due to elapsedTime.

Notes

  • Existing users keep their persisted shaderEffectEnabled setting.
  • New users get a best-effort shader auto-enable check scheduled via requestIdleCallback (or timeout fallback).
  • Soundboard: key now uses board.id + slot index (slot objects have no id).
Open in Web Open in Cursor 

@ryos-deploy
Copy link
Copy Markdown

ryos-deploy Bot commented Apr 5, 2026

The preview deployment for ryos-dev is ready. 🟢

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-04-05 13:16:17 CET

cursoragent and others added 2 commits April 5, 2026 12:50
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.

2 participants