Mobile performance issue — number-flow causes noticeable lag when updating rapidly inside a canvas game #145
Unanswered
tywang2006
asked this question in
Help
Replies: 1 comment
-
Hi, thanks for the discussion. Are you just using one NumberFlow element or several that are updating at the same time? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm using number-flow in a project where a canvas-based game is mounted inside a div. The game relies on requestAnimationFrame to run animations smoothly.
On mobile devices, when I rapidly update the number displayed by number-flow, the entire game noticeably lags or stutters. If I remove number-flow, the performance returns to normal.
This issue is much less noticeable on desktop, but on mobile (especially during quick consecutive updates) it severely affects the frame rate.
Would be great if this could be investigated or optimized for frequent updates in a high-refresh context like a game.
Thanks a lot for your work on this library — it's very useful!
Beta Was this translation helpful? Give feedback.
All reactions