-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Performance] Massive fps drop when creating large rectangels #24
Comments
I think part of the issue is we're using rough.draw() to draw the shape every frame instead of caching the shape on an off canvas. |
Caching really did wonders on that one, basically what I've done is assigned an off-screen canvas to each expensive element like (rectangles, hand-drawn elements), I draw on that off-screen canvas once and then every frame I just draw an image of that canvas onto the canvas that's actually shown to the user, this has proven to really boost performance. |
Describe the problem
Somehow, somewhy creating large rectangles causes the fps to drop dramatically, creating many small ones on the other hand doesn't seem to be a problem, I have no idea why this is the case.
The text was updated successfully, but these errors were encountered: