{"action":"created","issue":{"url":"https://api.github.com/repos/pithos/pithos/issues/198","labels_url":"https://api.github.com/repos/pithos/pithos/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/pithos/pithos/issues/198/comments","events_url":"https://api.github.com/repos/pithos/pithos/issues/198/events","html_url":"https://github.com/pithos/pithos/issues/198","id":77822503,"number":198,"title":"Very high CPU usage during buffering of AAC streams.","user":{"login":"JasonLG1979","id":6667703,"avatar_url":"https://avatars.githubusercontent.com/u/6667703?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonLG1979","html_url":"https://github.com/JasonLG1979","followers_url":"https://api.github.com/users/JasonLG1979/followers","following_url":"https://api.github.com/users/JasonLG1979/following{/other_user}","gists_url":"https://api.github.com/users/JasonLG1979/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonLG1979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonLG1979/subscriptions","organizations_url":"https://api.github.com/users/JasonLG1979/orgs","repos_url":"https://api.github.com/users/JasonLG1979/repos","events_url":"https://api.github.com/users/JasonLG1979/events{/privacy}","received_events_url":"https://api.github.com/users/JasonLG1979/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-18T22:05:00Z","updated_at":"2015-05-19T08:36:56Z","closed_at":null,"body":"As we have come to find out AAC buffering is not well behaved in Gstreamer. As a result of that for AAC streams Pithos receives literately 1000+ buffering messages in the sec or 2 it takes to buffer the stream. On my machine that results in about a 50% CPU usage spike during buffering. The most likely culprit is the \"self.update_song_row()\" in the buffering function.(since 1000+ buffering messages = 1000+ UI updates.) \r\n\r\nHere's a Video of stock Pithos with a couple added counters to keep track of the buffer messages and recover count to illustrate my point.\r\n\r\nhttps://www.youtube.com/watch?v=nLVIg7wd9gY\r\n\r\nI propose that since the buffering % is pretty much useless for AAC streams(as it goes from 0 straight to 100 most of the time.) and the only reason \"self.update_song_row()\" is in the buffering function is to update said useless buffer message we get rid of it and simply show \"Buffering...\" in the UI when Pithos is buffering and not actively update the UI during buffering.\r\n\r\nNot actively updating the UI during buffering drops the CPU usage down into the 3-8% range on my machine.     "},"comment":{"url":"https://api.github.com/repos/pithos/pithos/issues/comments/103399780","html_url":"https://github.com/pithos/pithos/issues/198#issuecomment-103399780","issue_url":"https://api.github.com/repos/pithos/pithos/issues/198","id":103399780,"user":{"login":"JasonLG1979","id":6667703,"avatar_url":"https://avatars.githubusercontent.com/u/6667703?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonLG1979","html_url":"https://github.com/JasonLG1979","followers_url":"https://api.github.com/users/JasonLG1979/followers","following_url":"https://api.github.com/users/JasonLG1979/following{/other_user}","gists_url":"https://api.github.com/users/JasonLG1979/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonLG1979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonLG1979/subscriptions","organizations_url":"https://api.github.com/users/JasonLG1979/orgs","repos_url":"https://api.github.com/users/JasonLG1979/repos","events_url":"https://api.github.com/users/JasonLG1979/events{/privacy}","received_events_url":"https://api.github.com/users/JasonLG1979/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T08:36:56Z","updated_at":"2015-05-19T08:36:56Z","body":"24% is still pretty high to show a pretty much useless message don't you think?"}}