{"action":"created","issue":{"url":"https://api.github.com/repos/phetsims/unit-rates/issues/172","repository_url":"https://api.github.com/repos/phetsims/unit-rates","labels_url":"https://api.github.com/repos/phetsims/unit-rates/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/unit-rates/issues/172/comments","events_url":"https://api.github.com/repos/phetsims/unit-rates/issues/172/events","html_url":"https://github.com/phetsims/unit-rates/issues/172","id":212330392,"number":172,"title":"implications of PhET-iO instrumentation on memory management","user":{"login":"pixelzoom","id":3046552,"avatar_url":"https://avatars2.githubusercontent.com/u/3046552?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelzoom","html_url":"https://github.com/pixelzoom","followers_url":"https://api.github.com/users/pixelzoom/followers","following_url":"https://api.github.com/users/pixelzoom/following{/other_user}","gists_url":"https://api.github.com/users/pixelzoom/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelzoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelzoom/subscriptions","organizations_url":"https://api.github.com/users/pixelzoom/orgs","repos_url":"https://api.github.com/users/pixelzoom/repos","events_url":"https://api.github.com/users/pixelzoom/events{/privacy}","received_events_url":"https://api.github.com/users/pixelzoom/received_events","type":"User","site_admin":false},"labels":[{"id":330139203,"url":"https://api.github.com/repos/phetsims/unit-rates/labels/dev:PhET-io","name":"dev:PhET-io","color":"1FFFFF","default":false},{"id":328369578,"url":"https://api.github.com/repos/phetsims/unit-rates/labels/type:question","name":"type:question","color":"EDCB62","default":false}],"state":"open","locked":false,"assignee":{"login":"samreid","id":679486,"avatar_url":"https://avatars3.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"assignees":[{"login":"samreid","id":679486,"avatar_url":"https://avatars3.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2017-03-07T04:53:34Z","updated_at":"2017-03-13T16:40:25Z","closed_at":null,"body":"This sim has a huge number of model items. So it minimizes the size of the scene graph by destroying and reconstructing pieces of the view when the selected item (Apples, Carrots, etc) changes.  This keeps things like Reset All responsive, and simplifies the implementation of view components. \r\n\r\nThe tradeoff is that it complicates memory management, compared to approaches where the view persists for the lifetime of the sim.  One needs to implement `dispose` correctly, and that's not an easy task, especially when large parts of common code don't do it properly.  So (as evidenced by https://github.com/phetsims/unit-rates/issues/170) it's going to take some work to plug memory leaks.\r\n\r\nWhat has me concerned is the eventual impact of PhET-iO instrumentation on memory management.  There are many things (like sun buttons) that currently do not need a `dispose` call.  But it seems like just about *everything* that involves a tandem will need a `dispose` call once the sim is instrumented.   And that is very likely to introduce memory leaks, requiring memory management to be revisited.\r\n\r\n@samreid Can you comment on this? Is this indeed the case?"},"comment":{"url":"https://api.github.com/repos/phetsims/unit-rates/issues/comments/286165614","html_url":"https://github.com/phetsims/unit-rates/issues/172#issuecomment-286165614","issue_url":"https://api.github.com/repos/phetsims/unit-rates/issues/172","id":286165614,"user":{"login":"samreid","id":679486,"avatar_url":"https://avatars3.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"created_at":"2017-03-13T16:40:25Z","updated_at":"2017-03-13T16:40:25Z","body":"The phet-io/tandem registry only exists when PhET-iO is enabled.  When running in phet brand, this memory leak won't be possible."}}
{"actor":{"display_login":"samreid"}}