{"action":"closed","issue":{"url":"https://api.github.com/repos/akbiggs/UnityTimer/issues/2","repository_url":"https://api.github.com/repos/akbiggs/UnityTimer","labels_url":"https://api.github.com/repos/akbiggs/UnityTimer/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/akbiggs/UnityTimer/issues/2/comments","events_url":"https://api.github.com/repos/akbiggs/UnityTimer/issues/2/events","html_url":"https://github.com/akbiggs/UnityTimer/issues/2","id":216728578,"node_id":"MDU6SXNzdWUyMTY3Mjg1Nzg=","number":2,"title":"Optimize GC in Unity5.4.4","user":{"login":"DavidSheh","id":4453301,"node_id":"MDQ6VXNlcjQ0NTMzMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4453301?v=4","gravatar_id":"","url":"https://api.github.com/users/DavidSheh","html_url":"https://github.com/DavidSheh","followers_url":"https://api.github.com/users/DavidSheh/followers","following_url":"https://api.github.com/users/DavidSheh/following{/other_user}","gists_url":"https://api.github.com/users/DavidSheh/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidSheh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidSheh/subscriptions","organizations_url":"https://api.github.com/users/DavidSheh/orgs","repos_url":"https://api.github.com/users/DavidSheh/repos","events_url":"https://api.github.com/users/DavidSheh/events{/privacy}","received_events_url":"https://api.github.com/users/DavidSheh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-24T10:07:01Z","updated_at":"2018-06-23T20:59:14Z","closed_at":"2018-06-23T20:59:14Z","author_association":"NONE","body":"I found 40B GC in UpdateAllTimers() function of TimerManager class that was caused by foreach and my unity version is 5.4.4. However, all the lower versions have this issue as to my knowlege.\r\nBefore optimize:\r\n```\r\nforeach (Timer timer in this._timers)\r\n{\r\n      timer.Update();\r\n}\r\n```\r\nAfter optimize\r\n```\r\nfor (int i = 0; i < this._timers.Count; i++)\r\n{\r\n     this._timers[i].Update();\r\n}\r\n```"}}
{"actor":{"display_login":"akbiggs"}}