{"action":"opened","issue":{"url":"https://api.github.com/repos/pzl/statbar/issues/2","labels_url":"https://api.github.com/repos/pzl/statbar/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/pzl/statbar/issues/2/comments","events_url":"https://api.github.com/repos/pzl/statbar/issues/2/events","html_url":"https://github.com/pzl/statbar/issues/2","id":116153254,"number":2,"title":"optimize modules","user":{"login":"pzl","id":315796,"avatar_url":"https://avatars.githubusercontent.com/u/315796?v=3","gravatar_id":"","url":"https://api.github.com/users/pzl","html_url":"https://github.com/pzl","followers_url":"https://api.github.com/users/pzl/followers","following_url":"https://api.github.com/users/pzl/following{/other_user}","gists_url":"https://api.github.com/users/pzl/gists{/gist_id}","starred_url":"https://api.github.com/users/pzl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pzl/subscriptions","organizations_url":"https://api.github.com/users/pzl/orgs","repos_url":"https://api.github.com/users/pzl/repos","events_url":"https://api.github.com/users/pzl/events{/privacy}","received_events_url":"https://api.github.com/users/pzl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-10T17:08:20Z","updated_at":"2015-11-10T17:08:20Z","closed_at":null,"body":"`datetime` is probably good enough. Only wakes up during minute change.\r\n\r\n`network` can probably be pinged by events. E.g. onconnect, ondisconnect events of network manager can send SIGUSR2 or something to `network` to inform of network change events. Can still poll every 20m or so for uncaught events.\r\n\r\n`transfer` may not be able to slim down much more\r\n\r\n`bluetooth` maybe pushed events like network\r\n\r\n`mem` may be reasonable\r\n\r\n`cpu` - calling `top -bn 2` is surprisingly slow and takes a lot to process the rest. This one is running most often, and usually has a CPU impact. Probably best target to focus on. May be worth writing in C, either as self-contained binary in `modules`, or even a function inside the client that spawns off a thread.\r\n\r\n`gpu` - already reduced to single call to nvidia. Probably not much more to be done, except hide some of the info (RPM?) by default and show on click. Reduce the scope of the common query\r\n\r\n`packages` - Probably fine, maybe adjusting some of the text processing to do better. Currently not `-Sy`ing pacman itself, and is relying on an external cron job to do that. Loses it's usefulness when not updating. Should bring the update call inside (but privileged command! oh joy).\r\n\r\n`uptime` - Would like to see this have a timer roll off, or proportional to the uptime. Every couple minutes right after boot, then every dozen minutes, every hour.\r\n\r\n`weather` - can probably sync this with NOAA update schedule\r\n\r\n`linux` - runs once. Works for me."}}