{"action":"created","issue":{"url":"https://api.github.com/repos/lxde/lxqt-panel/issues/157","labels_url":"https://api.github.com/repos/lxde/lxqt-panel/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/lxde/lxqt-panel/issues/157/comments","events_url":"https://api.github.com/repos/lxde/lxqt-panel/issues/157/events","html_url":"https://github.com/lxde/lxqt-panel/pull/157","id":64036175,"number":157,"title":"[WIP] plugin-desktopswitch: refactoring and optimizations","user":{"login":"npmiller","id":5684593,"avatar_url":"https://avatars.githubusercontent.com/u/5684593?v=3","gravatar_id":"","url":"https://api.github.com/users/npmiller","html_url":"https://github.com/npmiller","followers_url":"https://api.github.com/users/npmiller/followers","following_url":"https://api.github.com/users/npmiller/following{/other_user}","gists_url":"https://api.github.com/users/npmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/npmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npmiller/subscriptions","organizations_url":"https://api.github.com/users/npmiller/orgs","repos_url":"https://api.github.com/users/npmiller/repos","events_url":"https://api.github.com/users/npmiller/events{/privacy}","received_events_url":"https://api.github.com/users/npmiller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-24T16:05:30Z","updated_at":"2015-03-26T10:01:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/lxde/lxqt-panel/pulls/157","html_url":"https://github.com/lxde/lxqt-panel/pull/157","diff_url":"https://github.com/lxde/lxqt-panel/pull/157.diff","patch_url":"https://github.com/lxde/lxqt-panel/pull/157.patch"},"body":"(note: includes PR #155 since that's what I was working on initially)\r\nThis is a work in progress but basically what it does is:\r\n\r\n* initially create the button in the `DesktopSwitch` constructor\r\n* create and delete buttons in `onNumberOfDesktopChanged` if needed\r\n* refresh by modifying existing buttons\r\n\r\nThe performance difference is obvious for everything that needs a refresh (adding/deleting desktops or changing the configuration), it took 2 to 3 seconds to refresh and now it's basically instantaneous. And there probably still are a lots of call to refresh that could be avoided.\r\n\r\nI haven't really looked at the shortcuts yet, so it's very likely that as of right now this PR breaks them."},"comment":{"url":"https://api.github.com/repos/lxde/lxqt-panel/issues/comments/86431675","html_url":"https://github.com/lxde/lxqt-panel/pull/157#issuecomment-86431675","issue_url":"https://api.github.com/repos/lxde/lxqt-panel/issues/157","id":86431675,"user":{"login":"palinek","id":10990929,"avatar_url":"https://avatars.githubusercontent.com/u/10990929?v=3","gravatar_id":"","url":"https://api.github.com/users/palinek","html_url":"https://github.com/palinek","followers_url":"https://api.github.com/users/palinek/followers","following_url":"https://api.github.com/users/palinek/following{/other_user}","gists_url":"https://api.github.com/users/palinek/gists{/gist_id}","starred_url":"https://api.github.com/users/palinek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palinek/subscriptions","organizations_url":"https://api.github.com/users/palinek/orgs","repos_url":"https://api.github.com/users/palinek/repos","events_url":"https://api.github.com/users/palinek/events{/privacy}","received_events_url":"https://api.github.com/users/palinek/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T10:01:01Z","updated_at":"2015-03-26T10:01:01Z","body":"OK. when you're finished, squash your refactoring commits into one and I'll merge it into master."}}