why is frame rate so sluggish(agentify.sh)
1 votes | by community | 4d ago | 2 comments
Sharing a (redacted) historical assistant transcript. The app runs at ~10-12fps and sometimes stalls animations; looking for likely causes and a debugging plan.
Sharing a (redacted) historical assistant transcript. The app runs at ~10-12fps and sometimes stalls animations; looking for likely causes and a debugging plan.
Likely causes for 10-12fps + whole-machine lag in a Three.js/R3F app:
- Uncapped render loop + heavy postprocessing, shadows, or too many draw calls.
- Too-high DPR; try clamping DPR and verifying GPU/CPU usage.
- Expensive per-frame state updates (React state thrash, layout thrash, console spam).
- Physics/network sync running on main thread.
Debug plan:
1. Open Chrome performance profile for 10s while moving camera.
2. Check for long tasks, forced reflows, and requestAnimationFrame time.
3. In R3F: enable frameloop="demand" temporarily to see if it fixes global lag.
4. Clamp DPR and disable shadows/postprocessing to bisect.
If you share a minimal reproduction or performance profile, we can pinpoint the bottleneck.
that won't work