{"action":"created","issue":{"url":"https://api.github.com/repos/openfl/openfl/issues/830","labels_url":"https://api.github.com/repos/openfl/openfl/issues/830/labels{/name}","comments_url":"https://api.github.com/repos/openfl/openfl/issues/830/comments","events_url":"https://api.github.com/repos/openfl/openfl/issues/830/events","html_url":"https://github.com/openfl/openfl/pull/830","id":106124776,"number":830,"title":"Drawcommand refactor","user":{"login":"larsiusprime","id":739064,"avatar_url":"https://avatars.githubusercontent.com/u/739064?v=3","gravatar_id":"","url":"https://api.github.com/users/larsiusprime","html_url":"https://github.com/larsiusprime","followers_url":"https://api.github.com/users/larsiusprime/followers","following_url":"https://api.github.com/users/larsiusprime/following{/other_user}","gists_url":"https://api.github.com/users/larsiusprime/gists{/gist_id}","starred_url":"https://api.github.com/users/larsiusprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsiusprime/subscriptions","organizations_url":"https://api.github.com/users/larsiusprime/orgs","repos_url":"https://api.github.com/users/larsiusprime/repos","events_url":"https://api.github.com/users/larsiusprime/events{/privacy}","received_events_url":"https://api.github.com/users/larsiusprime/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-09-12T03:08:15Z","updated_at":"2015-09-15T15:42:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openfl/openfl/pulls/830","html_url":"https://github.com/openfl/openfl/pull/830","diff_url":"https://github.com/openfl/openfl/pull/830.diff","patch_url":"https://github.com/openfl/openfl/pull/830.patch"},"body":"This is the big one!\r\n\r\nThe old DrawCommand used dynamic enums which caused all *sorts* of GC-able allocations, as well as other performance bottlenecks. This fixes all that.\r\n\r\nSummary:\r\n\r\n1. Replace DrawCommand with DrawCommandBuffer\r\n2. Use DrawCommandReader as an abstract view into DrawCommandBuffer\r\n3. Refactor to re-use instance variables where possible to reduce allocations\r\n4. Profit!\r\n\r\nThis works for Defender's Quest quite well, reduces overall memory use, increases performance, and reduces GC-able allocations.\r\n\r\nThat said, such a huge change definitely requires some solid testing before it's pulled in. I have made changes to CanvasGraphics too, for instance, and I've checked my code, but I've not run it extensively. We should run this against demos to make sure it lines up and that there aren't regressions.\r\n\r\nTesting with HxScout, I got like 40% reduced memory, and decimated the GC allocations. YMMV."},"comment":{"url":"https://api.github.com/repos/openfl/openfl/issues/comments/140436686","html_url":"https://github.com/openfl/openfl/pull/830#issuecomment-140436686","issue_url":"https://api.github.com/repos/openfl/openfl/issues/830","id":140436686,"user":{"login":"larsiusprime","id":739064,"avatar_url":"https://avatars.githubusercontent.com/u/739064?v=3","gravatar_id":"","url":"https://api.github.com/users/larsiusprime","html_url":"https://github.com/larsiusprime","followers_url":"https://api.github.com/users/larsiusprime/followers","following_url":"https://api.github.com/users/larsiusprime/following{/other_user}","gists_url":"https://api.github.com/users/larsiusprime/gists{/gist_id}","starred_url":"https://api.github.com/users/larsiusprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsiusprime/subscriptions","organizations_url":"https://api.github.com/users/larsiusprime/orgs","repos_url":"https://api.github.com/users/larsiusprime/repos","events_url":"https://api.github.com/users/larsiusprime/events{/privacy}","received_events_url":"https://api.github.com/users/larsiusprime/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T15:42:41Z","updated_at":"2015-09-15T15:42:41Z","body":"@jcward: Most definitely. Flixel's bitmap log is an incredibly handy debugging feature, and being able to know with exact certainty what is being displayed on the screen from code would be incredibly useful. Especially in remote testing situations, as well as on our console efforts."}}