-
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
[iPad2] performance drop with play button #26
Comments
No change in 1.0.0-dev.6 |
Using the Ipad2, and unhooking the listener attached to the PlayButton, then the sim frame rate could go down as low as 12 fps while tapping the PlayButton. This happens in requirejs and build mode. I wonder if it is related to the gradients in the Play Button. |
Using a flatAppereanceStrategy, then the lowest number of frames I could get was 40 fps (with no listener). |
And hooking back the listener but with the flatAppereanceStrategy the lowest fps I could get was 30fps. |
@veillette I'm surprised that changing the appearance of the play button has any affect on performance. Any chance that you have a Canvas that's overlapping the play button, and causing it to be redrawn on every frame? |
There are two canvas nodes in the simulation. One for the pegs and one for the rendering of the balls. The peg canvas is limited to the galton board. It is a rectangle that just encompasses the triangular galton board. The ballsLayerNode canvas is redrawn at every frame but it does not overlap with the play button. The ballsLayerNode canvas bounds are given by the union of the galtonBoard and the histogramBounds. The performance is something that is symptomatic of the iPad and the Sun Buttons. This may have slipped under the radar as no other PhET simulations expect someone to be tapping a button. I logged an issue in sun (phetsims/sun#244). |
Ideally, we'd like to change the play button back to 3dAppearanceStrategy. @ariel-phet noted the (unexpected) change from 3D to flat when I published 1.0.0-dev.7. |
Actually, I knew this was a possibility given the open issues, however we should get the opinion of @amanda-phet I would be OK with the flat look so long as it is still easy to find. The 3d button does "pop" a bit more, but the sim is fairly straightforward. |
The flat design is fine. |
#62 may be partially responsible for this. The sim is continuously calling |
If we do go for the "flat" look, lets make sure to center the black triangle of the play button in the circle (it is a little off to the left currently) |
I'm afraid that's not currently possible. See phetsims/sun#236, which we agreed to address on 4/22/16, but has not made any progress. |
I think it may be related to a commit I did, that should be reverted. |
The centering problem is a general problem with sun buttons, where the content on flat buttons is not centered properly. See phetsims/sun#236. |
@ariel-phet I thought it looked off-center as well but when I played with this in illustrator I am more convinced that it is an optical illusion. |
The flat button.... I might have some ever so slight concern if this sim had many controls, but with so few controls it is just not really an issue. It would be good to understand this issue at some point ideally, but since it seems pathologically tied to this sim, I am also not too concerned. So - lets do two things:
|
unassinging @amanda-phet since she already gave the green light to the flat button in #26 (comment) |
@ariel-phet It might be worth having @jonathanolson spend 15 minutes digging around in the DOM to see if there's anything obvious. The DOM structure is still a mystery to me, so I'm unlikely to see the problem even if I'm looking directly at it. |
@ariel-phet said:
OK. Not a blocking issue for publication.
Since this problem is "pathologically tied to this sim", I don't think a sun issue is appropriate. I'm going to leave this issue open, mark it for developer meeting, and we can brainstorm here. |
@pixelzoom - I am curious about one WAG for an experiment. What if the play button were taken out of the control panel and put in the lower left such as in Rutherford (most of the time we have not had play buttons in control panels). Note - I am NOT suggesting we change the design. But if that were an easy experiment to perform, might be worth a try. Or better yet, put a flat button in the control panel and have a 3d button in the lower left (still a play button) so you could try the performance experiment in the same sim. |
@ariel-phet suggested:
Yes, worth a try. |
@ariel-phet I tried what you suggested in #26 (comment). See http://www.colorado.edu/physics/phet/dev/html/plinko-probability/1.0.0-dev.15/plinko-probability_en.html. In addition to the flat Play button in the upper-right panel of the Intro screen, this version has a 3D Play button in the lower-left corner. Pressing either Play button performs the same action. On iPad2 + iOS 9.3.5: I also tried putting the 3D Play button in the upper-left, with identical results. |
I added query parameter "play3d", which uses the 3D appearance for the Play button. Flat (default): |
Things we haven't done yet: (1) Brainstorm as a group, scheduled for Thu Sep 15. (#26 (comment)) @ariel-phet How do you want to proceed? This is the only open issue blocking dev testing. Do you want to do either of the above before dev testing begins? |
@pixelzoom - lets proceed with dev testing and a flat button if this is the only remaining issue. I will ask @jonathanolson to take a look, but he can do that regardless of dev testing. As we have noted this issue appears to be pathological to this sim, you have put quite a bit of intellectual effort into fixing it, and the flat bottom is a completely reasonable solutoin. |
@jonathanolson If you have time to take a look... You can switch between flat and 3D buttons using a query parameter, as described in #26 (comment). To reproduce the problem, run the sim on iPad2, go to the "Intro" screen, press the Play button repeatedly. |
Not a prerequisite for 1.0.0. |
Since this is deferred, dropping priority. Probably related to gradients being loaded/unloaded if I need to investigate. |
For phetsims/tasks#630
Test device: Tycho
Operating System: iOS 9.3.3
Browser: Safari
Problem description: Sim slows down substantially for a short time when you press the play button. This can be seen most easily by repeatedly pressing the play button to drop individual balls quickly.
Screenshots:
https://drive.google.com/file/d/0B9-NgawDrEu3STBnSTJ1T0ZURGs/view?usp=sharing
Troubleshooting information (do not edit):
Name: Plinko Probability
URL: http://www.colorado.edu/physics/phet/dev/html/plinko-probability/1.0.0-dev.5/plinko-probability_en.html
Version: 1.0.0-dev.5 2016-06-27 15:36:39 UTC
Features missing: fullscreen
User Agent: Mozilla/5.0 (iPad; CPU OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G21 Safari/601.1
Language: en-us
Window: 1024x671
Pixel Ratio: 1/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 IMGSGX543-124.1)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.00)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 8 uniform: 128
Texture: size: 4096 imageUnits: 8 (vertex: 8, combined: 8)
Max viewport: 4096x4096
OES_texture_float: true
Dependencies JSON: {"assert":{"sha":"7d27130a","branch":"master"},"axon":{"sha":"b71cc337","branch":"master"},"babel":{"sha":"0ce3b9c8","branch":"master"},"brand":{"sha":"f0b1f7da","branch":"master"},"chipper":{"sha":"e044eccd","branch":"master"},"dot":{"sha":"c9c05a5a","branch":"master"},"joist":{"sha":"fa5db70c","branch":"master"},"kite":{"sha":"dce9765e","branch":"master"},"phet-core":{"sha":"c48bf320","branch":"master"},"phetcommon":{"sha":"35ef94ad","branch":"master"},"plinko-probability":{"sha":"af3b08d0","branch":"master"},"scenery":{"sha":"4476eb95","branch":"master"},"scenery-phet":{"sha":"52b783d9","branch":"master"},"sherpa":{"sha":"77506dc3","branch":"master"},"sun":{"sha":"0d7e743b","branch":"master"},"tandem":{"sha":"b3c68afa","branch":"master"}}
The text was updated successfully, but these errors were encountered: