-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
2.0 perf updates #7543
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
2.0 perf updates #7543
Conversation
@limzykenneth This should be testable now! I had to update some screenshots for one text assignment test, but they were only failing on CI. Looks like some text was very close to wrapping and some change made it just different enough to not wrap on CI. I updated the font size for that test to not be right on the edge like that, which feels less clean than I'd like, but... I'm no closer to figuring out what shall detail changed than I was an hour ago :') |
ok TIL that test is failing on dev-2.0 too currently. I think that test flake is unrelated to this PR, and possibly even caused by unrelated CI dependency changes? but anyway that makes me feel more confident that this PR didn't break it! |
still seeing this issue on PRs |
I was thinking since the class have some similarity to It seems the test is also passing here now so I guess if we merge this it should fix the test on the branch and other PRs as well? |
Still not efficient enough as color object are frequently created and each will need to be serialized once regardless of how many times it is used.
@limzykenneth feel free to merge when the color serialization is ready! |
Still trying to figure out a more comprehensive cache for color object in general. That's because with each color object created, it will need to be serialized once first before it will be memoized but with each call to any function that takes simple number arguments, it will create a one time used color object which erases the memoization benefit. If you have an idea around here do share, I'll probably spend a bit more time on it and if I still have nothing I'll merge this for now. |
For some reason I'm not getting the full 60 fps on my linux PC (getting around 20 fps) not even with 1.11.3 (which gets about 30 fps), while on my Macbook Pro I'm able to get full 60 fps. Surely are Macs that good now? Anyway, that's beside the point. We can continue looking into other avenue for more optimizations but if it isn't too hard to get 60 fps on the original sketch it should be ok for now. |
Resolves #7539
States
class to keep track of what values have been setstates.key = value
tostates.setValue('key', value)
because using a getter/setter was noticeably slowerstates
to avoid having to read them from the canvas again onpop
To do:
serialize
for fills faster