{"action":"created","issue":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1263","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1263/labels{/name}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1263/comments","events_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1263/events","html_url":"https://github.com/syl20bnr/spacemacs/issues/1263","id":69447268,"number":1263,"title":"guide-key: Polling behavior kills kittens","user":{"login":"bgamari","id":1010174,"avatar_url":"https://avatars.githubusercontent.com/u/1010174?v=3","gravatar_id":"","url":"https://api.github.com/users/bgamari","html_url":"https://github.com/bgamari","followers_url":"https://api.github.com/users/bgamari/followers","following_url":"https://api.github.com/users/bgamari/following{/other_user}","gists_url":"https://api.github.com/users/bgamari/gists{/gist_id}","starred_url":"https://api.github.com/users/bgamari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgamari/subscriptions","organizations_url":"https://api.github.com/users/bgamari/orgs","repos_url":"https://api.github.com/users/bgamari/repos","events_url":"https://api.github.com/users/bgamari/events{/privacy}","received_events_url":"https://api.github.com/users/bgamari/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/syl20bnr/spacemacs/labels/bug%20:-(","name":"bug :-(","color":"fc2929"},{"url":"https://api.github.com/repos/syl20bnr/spacemacs/labels/Guide-key","name":"Guide-key","color":"207de5"},{"url":"https://api.github.com/repos/syl20bnr/spacemacs/labels/Kills%20Kittens%20(=%5E-%5E=)","name":"Kills Kittens (=^-^=)","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-04-19T17:37:54Z","updated_at":"2015-08-10T12:29:30Z","closed_at":null,"body":"Recently I noticed that each of the dozen-or-so emacs processes running on my laptop were waking up 10 times a second, severely impacting my laptop's battery life. `helm-timers` revealed that the culprit is `guide-key/polling-function`. I haven't get investigated whether this is due to spacemacs' configuration or inherent to the package but surely there is a better way to accomplish the goal of this timer than polling at 10 Hz."},"comment":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/comments/129426934","html_url":"https://github.com/syl20bnr/spacemacs/issues/1263#issuecomment-129426934","issue_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/1263","id":129426934,"user":{"login":"bgamari","id":1010174,"avatar_url":"https://avatars.githubusercontent.com/u/1010174?v=3","gravatar_id":"","url":"https://api.github.com/users/bgamari","html_url":"https://github.com/bgamari","followers_url":"https://api.github.com/users/bgamari/followers","following_url":"https://api.github.com/users/bgamari/following{/other_user}","gists_url":"https://api.github.com/users/bgamari/gists{/gist_id}","starred_url":"https://api.github.com/users/bgamari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgamari/subscriptions","organizations_url":"https://api.github.com/users/bgamari/orgs","repos_url":"https://api.github.com/users/bgamari/repos","events_url":"https://api.github.com/users/bgamari/events{/privacy}","received_events_url":"https://api.github.com/users/bgamari/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T12:29:30Z","updated_at":"2015-08-10T12:29:30Z","body":"@justbur indeed disabling the timers on loss of focus sounds like it should be a great improvement.\r\n\r\nAbout synchronizing timers: note that it's not multiple timers within `which-key` that you try to synchronize; you are trying to ensure that `which-key`'s timer fires at the same time as other timers on the system. In the optimal case, the CPU would only have to wake up once per second, service the relevant timers, and spend the rest of that second sleeping.\r\n\r\nThe worst possible case is timer events being randomly distributed throughout the second, preventing the CPU from ever sleeping long enough to reach the states where it can shut off large chunks of itself."}}