phetsims / color-vision

"Color Vision" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/color-vision
GNU General Public License v3.0
1 stars 7 forks source link

With other performance improvements, is it still necessary to pool photons? #39

Closed samreid closed 10 years ago

samreid commented 10 years ago

The photon pooling code increases the complexity. I'd recommend to run performance tests on iPad and a few other platforms and try to quantify how much Pooling is benefiting the application. If it is not a significant benefit, the pooling should be removed. If it is a significant benefit, then the benefit should be documented in RGBPhoton.js in the header JSDoc.

aaronsamuel137 commented 10 years ago

Tested with and without pooling on iPad, OSX Chrome and OSX Firefox using joist profiling. No real difference in frame rate, and no noticeable performance degradation without pooling. Went ahead and took the pooling code out to simplify. Assigning to @samreid for review.

aaronsamuel137 commented 10 years ago

Created a branch 'poolable' to do performance comparisons in commit fd8185c88b64ac3f49ce85dc42062a52154675d4. Didn't notice any real difference in frame rate or stuttering on iPad or OSX Chrome. Leaving Poolable out for now. It will be easy to add back if we need it in the future by merging in the poolable branch.

aaronsamuel137 commented 10 years ago

Closing.