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

Use phetAllocation to track + remove unnecessary allocations #30

Closed samreid closed 10 years ago

samreid commented 10 years ago

Use phetAllocation to track + remove unnecessary allocations. Consider pooling where appropriate.

samreid commented 10 years ago

Even though garbage collections are not a significant problem in this sim, reducing allocations will improve the performance.

aaronsamuel137 commented 10 years ago

Significantly reduced Color allocations. See commits df40e5873427b1306163ad75a768f593f46aa77b and 9d9f16d925adc8f7f4d6b83f4f45f7b1278d25b0. Reduced Vector2 allocations by updating the perceived color only when it changes, so as not to trigger re-draws of the thought bubbles.

Performance on iPad seems good. Closing for now.