-
Notifications
You must be signed in to change notification settings - Fork 9
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
Particles drop performance #209
Comments
In my opinion, each solute particle doesn't need to have a decorator in instance proxies. It may still need to be instrumented for state though (using our current save/load paradigm). |
Agreed, representing each particle in instance proxies may be overkill. As for saving state... I'm not convinced that saving/restoring individual particles is the way to go, or that the current implementation supports save/load well. There are lots of other way that "precipitate" could have been implemented. For example: have 1 model object (Precipitate) that has the state of where its particles are, and the view would be responsible for rendering Precipitate as multiple instances of ParticleNode, or perhaps even as PrecipitateNode that draws all particles using 1 path. The more general point here is that PhET-iO requirements (like what aspects of the precipitate need to be customizable, serializable, etc.) need to be considered during design, because they impact how the sim is implemented. |
I'm having trouble killing performance on my Mac browsers or in my VirtualBox+IE by shaking out particles, but it would be straightforward to omit TShakerParticle, TPrecipitateParticle from instance proxies. The original bug report was from May 5, 2016 and it would be good to confirm it is still a problem before working on it more. @phet-steele can you replicate this problem on master? |
Performance suffers pretty badly on an iPad 2 right out of the gate...so not really related to high amounts of precipitate in that case. I also cannot ruin performance on my Mac with current master (yay!). Precip instances look to be properly disposed on reset, removal, etc., so that makes it a bit hard to create the thousands of particles I used to be able to. That being said, I do lose performance quite handily after doing this:
I get hundreds of these:
@samreid The performance drop is likely due to the massive cascade of errors this creates, and not due to the number of precip particles present. So feel free to close this and create a new issue for this error. |
There is a new |
I tried the instructions from #209 (comment) on mac chrome and 4/5 times it was fine and on the 5th time it threw an assertion error that the @phet-steele can you double check on master at the moment and if this is replicable? |
@samreid, broke it first try with steps in #209 (comment). My
|
It would be good for @pixelzoom to look into the transient out of bounds concentration issue. @pixelzoom after investigating that part, please reassign to me to look into whether the |
@samreid said:
Before I do anything here.... Step 1 of #209 (comment) says:
Has this been reproduced when not running with Instance Proxies? If so, then let's break this out into a separate issue. |
Answered my own question. Yes, this can be reproduced without instance proxies. Moving that issue to #210. |
With the conversion to PhetioGroup in #244, there's a possibility that performance may be impacted further. The previous implementation resulted in at most 1 call to |
Does each particle need to be instrumented? What if that wasn't part of state, but just populated based on how saturated the solution was? |
We just did a lot of work in #244 to instrument every particle (mainly because it was causing the sim to fail CT), so it will be a shame if we chuck all of this. But we can certainly revisit when we get to redesign in #230. Populating based on how saturated the solution is only works for precipitate, and precipitate isn't the main performance issue (it just sits there on the bottom of the beaker). Shaker particles are the performance issue, because they animate - and don't we also need to address them? |
Those particles dropping transient, so I would be OK with not instrumenting them. I don't think we need to support launching a saved simulation with particles that are actually dropping. @arouinfar - what do you think? |
Please confirm that multiple calls to |
@kathy-phet agreed. |
I'm not sure who should be assigned here, perhaps the lead dev to determine if |
This issue (and all PhET-iO related issues for this sim) is unassigned and deferred until work resumes on #230 (redesign PhET-iO API). |
In #279 (comment), @arouinfar said:
This is further evidence that we may no longer have a performance problem, and that the Canvas implementation of particles may be just fine -- especially after the optimizations that I've made recently. So I decided to do some more rigourous testing. Test procedure:
Results: There was no observable performance degradation on the following platforms. All interactions remained smooth.
I then tested PhET-iO performance using the same steps, using https://phet-dev.colorado.edu/html/beers-law-lab/1.7.0-dev.7/phet-io/. Performance in Standalone was great for all of the above platforms. Performance on Studio was tested only for macOS (since iPad and iPhone are not instructional-design platforms) and performance was great. |
While I'm inclined to close this issue now, it's probably worth testing on a few "performance challenged" platforms, like older Chromebooks. @KatieWoe could you please follow the steps in #209 (comment), and report back for 1 or 2 of PhET's performance-challenged devices? You can skip Studio, but please test both phet and phet-io brands, using these links: |
I tested this on a chrome book and didn't see performance issues. |
Thanks @KatieWoe. Since there is no evidence of a performance problem, there is nothing to do, and I'm closing this issue. |
From https://github.com/phetsims/phet-io-wrappers/issues/23
Carried from https://github.com/phetsims/phet-io/issues/414 into this repo
@phet-steele said:
Precipitate and shaker particle data streams cause significant loses in performance. I can reliably cause an unresponsive web page on Win 10 browsers after reaching saturation. This is a pretty small amount of precip. being made, mind you....I can do much worse things 😈
https://drive.google.com/file/d/0B3HJopSo_QqLMndYQkdxcFoxelk/view?usp=sharing
For phetsims/phet-io#408.
and then:
@samreid particles are significantly affecting this sim's performance in instance proxies. Can anything at all be done about this? It hardly takes the addition of any particles to kill the browser.
The text was updated successfully, but these errors were encountered: