-
Notifications
You must be signed in to change notification settings - Fork 7
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
Basic Chart/Point Drawing Optimizations #1009
Conversation
@jeffpamer do you think we should wait until @AaronPlave's zooming work is done so that we can fully test this? |
Oh interesting, I didn't realize points could be zero size, I'll put in something to handle that ... likely just skip the point rendering entirely?
I was thinking it would be good to get this merged in first and then Aaron could just pull it into his branch to test it out. But looks like there's a couple issues to sort out! I'll look into them but not sure if I'll have enough time to solve today. |
I might try to carve out some time while traveling next week to look into this more, but otherwise I'll just need to pick it up the week after! |
92791d5
to
99db6fd
Compare
@AaronPlave @duranb sorry for the delay here but I think this should be patched up and ready to go, would you mind taking another look Aaron? The gist of the problem is that you typically handle high resolution rendering by scaling up your canvas size and context scale factor by A good little "a ha" moment for working with OffscreenCanvas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Does look like the drawImage
performance + deferred rendering of these points does result in at least slightly better performance for a large collection of resource plots with many points.
Cool good to hear, my hope would be the "perceived performance" would be the biggest benefit since the deferred rendering would give the main thread a chance to flush. We can also look into maybe tweaking exactly how long to delay the point rendering ... |
* Render points using offscreen canvas, split line and point drawing into two separate frames * account for devicepixelratio scaling, don't attempt to draw 0 radius points
* Render points using offscreen canvas, split line and point drawing into two separate frames * account for devicepixelratio scaling, don't attempt to draw 0 radius points
This PR does a couple things that I feel like are low-hanging fruit optimizations, and pretty "safe", i.e. shouldn't present any noticeable change relative to the current functionality. I'm interested to see after merging these in with @AaronPlave's zoom work what our baseline performance is, and then see where we need to go from there.