{"action":"created","issue":{"url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4673","repository_url":"https://api.github.com/repos/BabylonJS/Babylon.js","labels_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4673/labels{/name}","comments_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4673/comments","events_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4673/events","html_url":"https://github.com/BabylonJS/Babylon.js/issues/4673","id":338100059,"node_id":"MDU6SXNzdWUzMzgxMDAwNTk=","number":4673,"title":"[Bug] (Some?) animations consume more CPU with time","user":{"login":"fmmoret","id":5396858,"node_id":"MDQ6VXNlcjUzOTY4NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/5396858?v=4","gravatar_id":"","url":"https://api.github.com/users/fmmoret","html_url":"https://github.com/fmmoret","followers_url":"https://api.github.com/users/fmmoret/followers","following_url":"https://api.github.com/users/fmmoret/following{/other_user}","gists_url":"https://api.github.com/users/fmmoret/gists{/gist_id}","starred_url":"https://api.github.com/users/fmmoret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmmoret/subscriptions","organizations_url":"https://api.github.com/users/fmmoret/orgs","repos_url":"https://api.github.com/users/fmmoret/repos","events_url":"https://api.github.com/users/fmmoret/events{/privacy}","received_events_url":"https://api.github.com/users/fmmoret/received_events","type":"User","site_admin":false},"labels":[{"id":827814565,"node_id":"MDU6TGFiZWw4Mjc4MTQ1NjU=","url":"https://api.github.com/repos/BabylonJS/Babylon.js/labels/animations","name":"animations","color":"8afcb0","default":false},{"id":45382879,"node_id":"MDU6TGFiZWw0NTM4Mjg3OQ==","url":"https://api.github.com/repos/BabylonJS/Babylon.js/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"bghgary","id":19158740,"node_id":"MDQ6VXNlcjE5MTU4NzQw","avatar_url":"https://avatars2.githubusercontent.com/u/19158740?v=4","gravatar_id":"","url":"https://api.github.com/users/bghgary","html_url":"https://github.com/bghgary","followers_url":"https://api.github.com/users/bghgary/followers","following_url":"https://api.github.com/users/bghgary/following{/other_user}","gists_url":"https://api.github.com/users/bghgary/gists{/gist_id}","starred_url":"https://api.github.com/users/bghgary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bghgary/subscriptions","organizations_url":"https://api.github.com/users/bghgary/orgs","repos_url":"https://api.github.com/users/bghgary/repos","events_url":"https://api.github.com/users/bghgary/events{/privacy}","received_events_url":"https://api.github.com/users/bghgary/received_events","type":"User","site_admin":false},"assignees":[{"login":"bghgary","id":19158740,"node_id":"MDQ6VXNlcjE5MTU4NzQw","avatar_url":"https://avatars2.githubusercontent.com/u/19158740?v=4","gravatar_id":"","url":"https://api.github.com/users/bghgary","html_url":"https://github.com/bghgary","followers_url":"https://api.github.com/users/bghgary/followers","following_url":"https://api.github.com/users/bghgary/following{/other_user}","gists_url":"https://api.github.com/users/bghgary/gists{/gist_id}","starred_url":"https://api.github.com/users/bghgary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bghgary/subscriptions","organizations_url":"https://api.github.com/users/bghgary/orgs","repos_url":"https://api.github.com/users/bghgary/repos","events_url":"https://api.github.com/users/bghgary/events{/privacy}","received_events_url":"https://api.github.com/users/bghgary/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2018-07-04T01:16:38Z","updated_at":"2018-07-05T16:33:40Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"# Bugs\r\n\r\n- Bug repro on [playground](https://www.babylonjs-playground.com/index.html#4GJCJ3)\r\n- Expected result: I expect my game to perform in a consistent way & not degrade as time passes.\r\n- Current result: My game goes from ~10% cpu to 100% after a few minutes of idle animation.\r\n\r\nI binary searched the commits & narrowed it down to this PR https://github.com/BabylonJS/Babylon.js/pull/4563\r\n\r\nIf I revert this change, my game does not degrade with time.\r\n\r\nHere's a screenshot of the profiler output. The listener curve is truncated, but it's a saw-tooth & doesn't leak upward / accumulate beyond a certain point.\r\n![untitled 2](https://user-images.githubusercontent.com/5396858/42251537-daecddd2-7eec-11e8-9938-3a00b634b9e8.png)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/comments/402781041","html_url":"https://github.com/BabylonJS/Babylon.js/issues/4673#issuecomment-402781041","issue_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4673","id":402781041,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjc4MTA0MQ==","user":{"login":"bghgary","id":19158740,"node_id":"MDQ6VXNlcjE5MTU4NzQw","avatar_url":"https://avatars2.githubusercontent.com/u/19158740?v=4","gravatar_id":"","url":"https://api.github.com/users/bghgary","html_url":"https://github.com/bghgary","followers_url":"https://api.github.com/users/bghgary/followers","following_url":"https://api.github.com/users/bghgary/following{/other_user}","gists_url":"https://api.github.com/users/bghgary/gists{/gist_id}","starred_url":"https://api.github.com/users/bghgary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bghgary/subscriptions","organizations_url":"https://api.github.com/users/bghgary/orgs","repos_url":"https://api.github.com/users/bghgary/repos","events_url":"https://api.github.com/users/bghgary/events{/privacy}","received_events_url":"https://api.github.com/users/bghgary/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T16:33:40Z","updated_at":"2018-07-05T16:33:40Z","author_association":"CONTRIBUTOR","body":"It looks like the playground code is creating new animation objects every time `objectTick` is called. This is definitely going to leak. You can see this if you type `BABYLON.Engine.LastCreatedScene.animatables` in the debug console. This array just keeps growing and growing as calling `scene.beginDirectAnimation` will just keep adding to the list.\r\n\r\n@fmmoret\r\n> I binary searched the commits & narrowed it down to this PR #4563\r\n\r\nI'm not sure what you are seeing with this. My PR makes it such that animations can have only one frame. Without this change, the code in your playground doesn't work at all since it immediately throws an exception."}}
{"actor":{"display_login":"bghgary"}}