-
Notifications
You must be signed in to change notification settings - Fork 12
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 improvements for ChromeOS #198
Comments
I suspect that performance hit is coming from the graphs and griddle as a lot of animation. To verify it would be helpful to see where time is spent on the device. @KatieWoe and I will meet today to investigate (either with screen share or setting up remote access). |
I am not able to see where time is being spent on ChromeOS, im inspecting a build with With the same build on my Windows 10 machine I can see the following however on Chrome: Which shows a substantial amount of time spent drawing the skater plot. |
drawSkatterData is slow because we draw every single point with fill/stroke, rather than drawing them all at once. But that is necessary because different points could have different colors and opacity. |
In the above commit I removed the repaint when opacity of a data point changes. This is massively inefficient because it repaints the canvas when ever a single data point's opacity changes. Over slack I asked @KatieWoe to see if removing this improves things and she said that performance is
This code can be fully removed because of changes to point behavior in #148, we can get away with redrawing the plot only when new data is added/removed. |
The data point removal could probably be improved. Every time a point is removed the plot is redrawn. And the behavior currently is that we remove many points at once. So there are frames where we remove ~200 points at once, and therefore redraw the canvas ~200 times in a single frame. |
The above commits support #198 (comment). |
@KatieWoe can you please check performance of the graphs screen in this version? |
Seems to run faster but definitely has jumpy behavior where it slows down a fair amount. |
Upon further inspection, I found that the canvas for the graph is repainted with updateDisplay and |
Done in the above commit. On Windows Chrome with ?profiler, I could see a noticeable dip to ~40-50 fps when fading out many points. After above commit this is gone. Actually, I think this looks nicer as well. |
@KatieWoe could you please do another performance check on ChromeOS for this version? |
Better. Still there, but less obvious. I'm using a different device right now, so I may need to look at the other one later to confirm for sure. |
On the original chromebook it looks about the same (as the last dev version). |
This issue was all about performance on the Graphs screen. The graphs on that screen have been entirely re-implemented to use griddle and so I am curious if hat has had an impact on this issue. Removing assignment for now, but will flag in a future QA test. |
The sim has passed QA testing and performance checks in the most recent RC and publication. Closing. |
Frome phetsims/qa#470, Performance of the Graphs screen on ChromeOS was reported as "fair" and it was requested that we look into performance improvements for that screen.
The text was updated successfully, but these errors were encountered: