-
Notifications
You must be signed in to change notification settings - Fork 120
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
Frame rate slows to a crawl when calling text() #69
Comments
As of now, most of typography-related methods are just prototypes. We added them when we were done with our other Google Summer of Code goals. We do intend to optimize this later. |
I don't have much experience with optimizing things like this, but, I managed to trace the source of the slowdown: Line 170 in 7269080
Perhaps my observations are obvious to the authors:
Again, I don't really know the fine details of what's going on. I thought I would just point this out. |
@MrGallo, you're correct. I didn't look into this much, but your comments do seem reasonable. I don't have the time to work on this right now, but I'll be happy to accept pull requests that implement this change. I'm also assuming that I'm calling
You're correct. Since we were just adding experimental support for text, I didn't spend much time on figuring out the math that gives us a tighter bounding box for the text. Using the whole canvas is really an overkill. Again, happy to accept pull requests :) |
This will also be addressed for this year's GSOC (see #104). Might make sense to discuss this there. I'm closing this thread. |
Describe the bug
When drawing text on screen (calling text() from draw() ) the FPS drops to 2
To Reproduce
Expected behavior
Should print 50-60
System information:
The text was updated successfully, but these errors were encountered: