-
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
When svg objects are partially offscreen, things slow way down on iPad #270
Comments
The same problem can be observed simply by dragging the skater. When you drag him near/off an edge, the performance goes way down. |
@jonathanolson suggested: the problem might be caused by the SVG clip currently applied for the entire screen region (for Scenes that don't take up the entire window, it matters for IE9) I tried removing the clip region and it did not solve the problem. However, webgl makes this problem disappear. |
We are able to observe this in energy-skate-park on iPad Air 2 iOS 12, when dragging the skater so that part of is off screen with WebGL disabled the framerate drops by ~50%. It would be helpful to investigate this again because we are trying to decide whether or not we can continue to develop energy-skate-park without custom WebGL work (see phetsims/energy-skate-park#42 (comment)). This is one of the last considerations that is preventing us from moving away from WebGL. If we can't remove WebGL we will either need to invest in broader WebGL support in scenery for text and shapes (high up front cost) or continue to add complex sim-specific WebGL code (high sim development and maintenance cost). @ariel-phet can you please review and assign priority to this issue? |
@jessegreenberg is a potential solution to not allow the skater to be dragged off screen (which seems like a reasonable limitation)? |
I should have been more clear, the issue isn't specific to dragging but any time the skater is partially off screen. So as the skater moves off screen on its own the framerate will drop from ~60fps to ~30fps when rendering with SVG. |
Marking for dev meeting |
From dev meeting discussion:
|
I found I was able to work around this in energy-skate-park by rendering one of the animating components (the bar graph) with 'canvas' while everything else uses 'svg'. Oddly enough, even when the skater is rendered with 'svg' the issue is no longer present. It looks like we can workaround this in the sim so removing assignment from this issue again. |
I am no longer seeing this in iOS 13 - In energy-skate-park if the skater and PieChartNode are rendered in SVG and dragged off screen, I don't notice a performance drop while partially out of screen anymore,. |
See parent issue:
phetsims/energy-skate-park-basics#160
@jbphet said
Over Skype, @jonathanolson said,
[I]s the skater css-transformed? if so remove and test. Is it still slow and it's SVG? Try Canvas and see if there's the same behavior.
The text was updated successfully, but these errors were encountered: