Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need smooth animation of canvas #21

Open
macdelacruz opened this issue May 5, 2023 · 1 comment
Open

Need smooth animation of canvas #21

macdelacruz opened this issue May 5, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@macdelacruz
Copy link

macdelacruz commented May 5, 2023

Imagine 2000 items in the wheel. Although items are tiny, you can't get the wheel to spin smoothly. It looks lagging, as if it jumps several items ahead of the pointer.

@CrazyTim
Copy link
Owner

CrazyTim commented May 9, 2023

Hi @macdelacruz,

I'm not sure 2000 or even 200 items is a good use case for a wheel? A roulette wheel has about 40. Why so many?

Having said that, the wheel does make a lot of canvas calls on each frame, which can probably be optimised. I noticed a drop in FPS at around 100 items. This was on an intel 2.4GHz with integrated graphics. It would be great if the number of items didn't affect performance, and this might be worth looking into for lower-end devices.

Note: If I set the labels to empty string (not rendered), then there was no drop in FPS on my machine up to 2000 items, so it looks like the text rendering takes a huge toll.

Note: The items didn't render at all if there was over 25k items. Which is interesting I guess 😄

@CrazyTim CrazyTim added the enhancement New feature or request label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants