phetsims / masses-and-springs-basics

"Masses and Springs: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 3 forks source link

Performance on Edge browser for Stretch and Bounce screens #40

Open KatieWoe opened 5 years ago

KatieWoe commented 5 years ago

Test device: Dell Laptop Operating System: Win 10 Browser: Edge Problem description: For https://github.com/phetsims/QA/issues/220. Seems to be the same issue as https://github.com/phetsims/masses-and-springs/issues/312. The performance when dragging a mass, ruler, or slider on the stretch or bounce screen is poor. The mass trails noticeably behind the mouse. Making the window smaller improves or fixes the issue. Steps to reproduce:

  1. Make window as large as possible
  2. Go to first screen
  3. Use mouse to quickly drag a mass or ruler across the screen.

Screenshots: draglag

Troubleshooting information (do not edit):

Name: ‪Masses and Springs: Basics‬ URL: https://phet-dev.colorado.edu/html/masses-and-springs-basics/1.0.0-dev.11/phet/masses-and-springs-basics_en_phet.html Version: 1.0.0-dev.11 2018-11-12 16:16:41 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134 Language: en-US Window: 1536x756 Pixel Ratio: 2.5/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Microsoft (Microsoft Edge) Vertex: attribs: 16 varying: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"master"},"axon":{"sha":"036865d6","branch":"master"},"brand":{"sha":"1fd6682e","branch":"master"},"chipper":{"sha":"9e1987e6","branch":"master"},"dot":{"sha":"bbbd8526","branch":"master"},"griddle":{"sha":"f64a7cf0","branch":"master"},"joist":{"sha":"11f7cf47","branch":"master"},"kite":{"sha":"b0fc6c9c","branch":"master"},"masses-and-springs":{"sha":"0ab4798a","branch":"master"},"masses-and-springs-basics":{"sha":"90423db0","branch":"master"},"phet-core":{"sha":"714b088a","branch":"master"},"phet-io":{"sha":"3acf45ca","branch":"master"},"phet-io-wrapper-classroom-activity":{"sha":"5dea7f54","branch":"master"},"phet-io-wrapper-hookes-law-energy":{"sha":"b42eaef7","branch":"master"},"phet-io-wrapper-lab-book":{"sha":"b884e9c1","branch":"master"},"phet-io-wrappers":{"sha":"e90822f4","branch":"master"},"phetcommon":{"sha":"869b2561","branch":"master"},"query-string-machine":{"sha":"06ed6276","branch":"master"},"scenery":{"sha":"3fbe7bbb","branch":"master"},"scenery-phet":{"sha":"76baf536","branch":"master"},"sherpa":{"sha":"2cd50500","branch":"master"},"sun":{"sha":"bc8424bb","branch":"master"},"tambo":{"sha":"ad355580","branch":"master"},"tandem":{"sha":"93822898","branch":"master"},"twixt":{"sha":"11a0c804","branch":"master"}}
arouinfar commented 5 years ago

@ariel-phet decided to defer this issue while MAS was in RC testing, noting:

Marking as deferred. This sim will surely be revisited at some point and we can look more deeply at that time

@ariel-phet should this still be deferred, or should @Denz1994 revisit for MASB/MAS redeploy?

ariel-phet commented 5 years ago

@Denz1994 @arouinfar I am still not seeing this as a "major" issue. Considering JO is on vacation currently, and most people need to consult with him for performance improvements, I would just press ahead.

However, I do think learning to troubleshoot performance issues is a useful experience, so I am going to mark this as low priority and leave assigned to Denzell.

@Denz1994 this issue should NOT block publication of MAS:B but would be worthy of investigation and your learning as time allows.

Denz1994 commented 5 years ago

I think we can get away with reducing the amount of pointsPerLoop for each coil in the spring. I reduced it by 12 points per coil, so that should reduce the amount of numberOfCoilPoints that need to be calculated when the xScaleProperty changes.

The drawback is the springs may look negligibly more rigid. Can you confirm that this is acceptable @arouinfar?

Denz1994 commented 5 years ago

Note: Above change should only affect oscillating masses.

arouinfar commented 5 years ago

@Denz1994 the oscillating springs in dev.11 and master look equally smooth to me!

Denz1994 commented 5 years ago

Great, I'll take a similar approach to the massNodes and reassign for comparison.

Denz1994 commented 5 years ago

MassNodes have been optimitzed in https://github.com/phetsims/masses-and-springs/commit/6c3904f as a part of https://github.com/phetsims/masses-and-springs/issues/312. It is good to note that the same bahavior is in this sim, but I'll defer to the same conclusion in https://github.com/phetsims/masses-and-springs/issues/312#issuecomment-413325300.