-
Notifications
You must be signed in to change notification settings - Fork 5
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
IO types cause increase in memory footprint #71
Comments
My summary from phetsims/unit-rates#207 (comment)
@pixelzoom replied:
Perhaps a short call would be very helpful? I'll be on slack. |
Discussed with @samreid via Slack. This has likely been a problem in brand=phet-io for a long time, and was not noticed due to insufficient memory testing. It didn't manifest previously in Unit Rates, because that sim has not been instrumented. After IO types were moved to tandem, they were no longer stubs, and therefore contributed to the memory footprint of all brands. Example of the problem in BooleanProperty. Previously in the constructor, every new instance received a new instance of BooleanIO. function BooleanProperty( value, options )
...
options.phetioType = BooleanIO();
...
} This fix (which is what most of the above commits are doing) reuses 1 instance of BooleanIO for all instances of BooleanPropertyIO. var BooleanPropertyIO = PropertyIO( BooleanIO )
function BooleanProperty( value, options )
...
options.phetioType = BooleanPropertyIO;
...
} |
Another 0.5MB saved in the preceding commit. |
We could reduce PhET-iO memory footprint by eliminating the wrapper instances (aka |
In phetsims/graphing-quadratics#50 (comment) @pixelzoom reported:
@pixelzoom anything else to do for this issue? |
Seems like this issue is resolved. Closing. |
(cherry picked from commit 773ec5e)
(cherry picked from commit 036865d)
(cherry picked from commit 968bf3c)
From phetsims/unit-rates#207 (comment):
The text was updated successfully, but these errors were encountered: