Mobile browsers are powerful, but you only get ~16ms per frame at 60 FPS—and part of that belongs to the browser. Here’s a practical checklist:
← Back to Blog
- Batch your drawing. Reduce state changes; avoid unnecessary gradients or shadows each frame.
- Prefer integer math. Sub‑pixel rendering looks nice but can be expensive; snap to whole pixels when possible.
- Use one event stream. Pointer events unify touch/mouse; mark listeners as
passiveto avoid main‑thread jank. - Cap work per tick. Keep your game loop under 12ms; move non‑critical work outside the loop.
- Profile often. Chrome’s Performance panel reveals long tasks, layout trashing, and expensive styles.