phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
MIT License
8 stars 6 forks source link

Memory leak in PreferencesDialog #889

Closed zepumph closed 1 year ago

zepumph commented 1 year ago

When creating and immediately disposing 50 preferences dialogs for Friction, the memory increased from 37MB to 66MB. Related to https://github.com/phetsims/scenery-phet/issues/769 but I think we have tightened things up more over there.

zepumph commented 1 year ago

Blocking friction PhET-iO

zepumph commented 1 year ago

After the above commits, we are down to 47MB after 50 create/dispose calls.

zepumph commented 1 year ago

Ok on master right now I am loading a plain friction at 40MB, and creating 50/100/200 preferences dialogs (and disposing them) results in 46.5MB

zepumph commented 1 year ago

createDisposing 100 preferences dialogs with RAP goes from 61.2 -> 64.9

zepumph commented 1 year ago

I see that the media pipe options doesn't support dispose (see https://github.com/phetsims/scenery/issues/1494#issuecomment-1341804903 but also it doesn't block publication), but otherwise I think we are done here. Closing