{"action":"created","issue":{"url":"https://api.github.com/repos/magefree/mage/issues/2030","repository_url":"https://api.github.com/repos/magefree/mage","labels_url":"https://api.github.com/repos/magefree/mage/issues/2030/labels{/name}","comments_url":"https://api.github.com/repos/magefree/mage/issues/2030/comments","events_url":"https://api.github.com/repos/magefree/mage/issues/2030/events","html_url":"https://github.com/magefree/mage/pull/2030","id":161938594,"number":2030,"title":"Improve GUI performance","user":{"login":"draxdyn","id":18101349,"avatar_url":"https://avatars.githubusercontent.com/u/18101349?v=3","gravatar_id":"","url":"https://api.github.com/users/draxdyn","html_url":"https://github.com/draxdyn","followers_url":"https://api.github.com/users/draxdyn/followers","following_url":"https://api.github.com/users/draxdyn/following{/other_user}","gists_url":"https://api.github.com/users/draxdyn/gists{/gist_id}","starred_url":"https://api.github.com/users/draxdyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draxdyn/subscriptions","organizations_url":"https://api.github.com/users/draxdyn/orgs","repos_url":"https://api.github.com/users/draxdyn/repos","events_url":"https://api.github.com/users/draxdyn/events{/privacy}","received_events_url":"https://api.github.com/users/draxdyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-23T14:35:45Z","updated_at":"2016-06-28T11:26:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/magefree/mage/pulls/2030","html_url":"https://github.com/magefree/mage/pull/2030","diff_url":"https://github.com/magefree/mage/pull/2030.diff","patch_url":"https://github.com/magefree/mage/pull/2030.patch"},"body":"Currently XMage's GUI can be slow, especially on large screens with large GUI sizes or slow machines, because of a few apparently CPU-intensive calls, as well as the fact that everything tends to be redrawn on every update from the server, without much caching of the drawn items, and Swing/AWT apparently being relatively slow at drawing text, round rects and resized images.\r\n\r\nThis branch contains:\r\n1. A bunch of small fixes to CPU hotspots that apparead in profiling\r\n2. A way to register image caches so that they can be flushed on GUI resize, reducing the load and reliance on the garbage collector\r\n3. Addition of a global cache for resized and rotated images, and changes to make everything use it (including ScaledImagePanel, card preview, and all resizing APIs)\r\n4. Changes to a few custom widgets that appeared highest during profiling that change painting to create a Key class with all the parameters, paint the widget offscreen, store the resulting image in a cache shared among widget instances, and have the actual painting just consist of a drawImage call\r\n5. Support for disabling animations (currently there is no way to actually disable them without changing a variable in the source, though)\r\n\r\nOverall, this should significantly improve performance as well as simplify the code in some instances, like the removal of most of ScaledImagePanel's logic in favor of just using the global cache of resized images.\r\n\r\nThe commits should be independent, except for the image cache registration required by following commits, and the resized image cache being required for ScaledImagePanel's rewrite.\r\n"},"comment":{"url":"https://api.github.com/repos/magefree/mage/issues/comments/229022612","html_url":"https://github.com/magefree/mage/pull/2030#issuecomment-229022612","issue_url":"https://api.github.com/repos/magefree/mage/issues/2030","id":229022612,"user":{"login":"LevelX2","id":2066790,"avatar_url":"https://avatars.githubusercontent.com/u/2066790?v=3","gravatar_id":"","url":"https://api.github.com/users/LevelX2","html_url":"https://github.com/LevelX2","followers_url":"https://api.github.com/users/LevelX2/followers","following_url":"https://api.github.com/users/LevelX2/following{/other_user}","gists_url":"https://api.github.com/users/LevelX2/gists{/gist_id}","starred_url":"https://api.github.com/users/LevelX2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LevelX2/subscriptions","organizations_url":"https://api.github.com/users/LevelX2/orgs","repos_url":"https://api.github.com/users/LevelX2/repos","events_url":"https://api.github.com/users/LevelX2/events{/privacy}","received_events_url":"https://api.github.com/users/LevelX2/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T11:26:41Z","updated_at":"2016-06-28T11:26:41Z","body":"Sounds good. Thanks for your contribution."}}
{"actor":{"display_login":"LevelX2"}}