Skip to content
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

Checking "H3O+/OH- Ratio" checkbox takes ~1 second #82

Closed
ghost opened this issue May 29, 2019 · 3 comments
Closed

Checking "H3O+/OH- Ratio" checkbox takes ~1 second #82

ghost opened this issue May 29, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented May 29, 2019

Test Device

Hopper, Leibniz

Operating System

iOS 12.3.1

Browser

Mobile Safari 12

Problem Description

For phetsims/qa#323. In the "Micro" and "My Solutions" screens, if you have lots of ions of either kind, i.e. the solution is either highly acidic or highly basic, and you check the hydronium / hydroxide ratio checkbox, it takes about one second for the ions to appear.

Visuals

It doesn't look that bad in this gif, but it is noticeable when you're playing with the sim.

issue

@ghost ghost added the type:performance label May 29, 2019
@ghost ghost assigned pixelzoom May 29, 2019
@pixelzoom
Copy link
Contributor

Thanks for reporting.

The time it takes to display the image depends on the number of molecules; more molecules requires more time. And the implementation is unchanged from the published version. That said...

I tested on both ends of the iPad spectrum (iPad6 + iOS12, iPad2 + iOS9) and performance seems acceptable. @arouinfar please confirm. If it's not acceptable, I'll investigate whether there's a more efficient way to draw the molecules.

@pixelzoom pixelzoom assigned arouinfar and unassigned pixelzoom May 30, 2019
@pixelzoom pixelzoom changed the title Checking hydronium / hydroxide ratio checkbox takes ~1 second Checking H<sub>3</sub>O<sup>+<sup>/OH<sup>-</sup> Ratio checkbox takes ~1 second Jun 1, 2019
@pixelzoom pixelzoom changed the title Checking H<sub>3</sub>O<sup>+<sup>/OH<sup>-</sup> Ratio checkbox takes ~1 second Checking "H3O+/OH- Ratio" checkbox takes ~1 second Jun 1, 2019
@arouinfar
Copy link
Contributor

@lmulhall-phet observed this issue on some of our newest iPads, Hopper (iPad 6, iOS 12) and Leibniz (iPad Air 2, iOS 12). Testing myself, I would say that the lag is borderline acceptable. The lag is long enough that some users may end up tapping the checkbox a 2nd time while waiting for the particles to appear, thereby unchecking the checkbox. While annoying, this issue isn't particularly harmful.

Interestingly, latest (1.2.18) is buttery smooth, and there is absolutely no noticeable lag. Perhaps the 1.3 branch has picked up some common code changes which significantly slow things down. I think a short investigation might be worthwhile @pixelzoom.

@pixelzoom
Copy link
Contributor

pixelzoom commented Jun 15, 2019

Rendering of H3O+/OH- Ratio is performed in RatioNode. This issue and #83 are identical, because RatioNode is not updated until it becomes visible. So checking the checkbox is equivalent to selecting a new solute, or changing a solution's pH. I'm going to close this issue as "duplicate", and continue work in #83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants