{"action":"created","issue":{"url":"https://api.github.com/repos/GaurangTandon/ProKeys/issues/3","repository_url":"https://api.github.com/repos/GaurangTandon/ProKeys","labels_url":"https://api.github.com/repos/GaurangTandon/ProKeys/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/GaurangTandon/ProKeys/issues/3/comments","events_url":"https://api.github.com/repos/GaurangTandon/ProKeys/issues/3/events","html_url":"https://github.com/GaurangTandon/ProKeys/issues/3","id":106154776,"number":3,"title":"Excessive CPU usage in Inbox","user":{"login":"ezuk","id":1092548,"avatar_url":"https://avatars.githubusercontent.com/u/1092548?v=3","gravatar_id":"","url":"https://api.github.com/users/ezuk","html_url":"https://github.com/ezuk","followers_url":"https://api.github.com/users/ezuk/followers","following_url":"https://api.github.com/users/ezuk/following{/other_user}","gists_url":"https://api.github.com/users/ezuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ezuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezuk/subscriptions","organizations_url":"https://api.github.com/users/ezuk/orgs","repos_url":"https://api.github.com/users/ezuk/repos","events_url":"https://api.github.com/users/ezuk/events{/privacy}","received_events_url":"https://api.github.com/users/ezuk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GaurangTandon/ProKeys/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"GaurangTandon","id":6308683,"avatar_url":"https://avatars.githubusercontent.com/u/6308683?v=3","gravatar_id":"","url":"https://api.github.com/users/GaurangTandon","html_url":"https://github.com/GaurangTandon","followers_url":"https://api.github.com/users/GaurangTandon/followers","following_url":"https://api.github.com/users/GaurangTandon/following{/other_user}","gists_url":"https://api.github.com/users/GaurangTandon/gists{/gist_id}","starred_url":"https://api.github.com/users/GaurangTandon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GaurangTandon/subscriptions","organizations_url":"https://api.github.com/users/GaurangTandon/orgs","repos_url":"https://api.github.com/users/GaurangTandon/repos","events_url":"https://api.github.com/users/GaurangTandon/events{/privacy}","received_events_url":"https://api.github.com/users/GaurangTandon/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/GaurangTandon/ProKeys/milestones/1","html_url":"https://github.com/GaurangTandon/ProKeys/milestones/2.6.0","labels_url":"https://api.github.com/repos/GaurangTandon/ProKeys/milestones/1/labels","id":1302543,"number":1,"title":"2.6.0","description":null,"creator":{"login":"GaurangTandon","id":6308683,"avatar_url":"https://avatars.githubusercontent.com/u/6308683?v=3","gravatar_id":"","url":"https://api.github.com/users/GaurangTandon","html_url":"https://github.com/GaurangTandon","followers_url":"https://api.github.com/users/GaurangTandon/followers","following_url":"https://api.github.com/users/GaurangTandon/following{/other_user}","gists_url":"https://api.github.com/users/GaurangTandon/gists{/gist_id}","starred_url":"https://api.github.com/users/GaurangTandon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GaurangTandon/subscriptions","organizations_url":"https://api.github.com/users/GaurangTandon/orgs","repos_url":"https://api.github.com/users/GaurangTandon/repos","events_url":"https://api.github.com/users/GaurangTandon/events{/privacy}","received_events_url":"https://api.github.com/users/GaurangTandon/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-09-12T17:38:38Z","updated_at":"2015-09-12T17:38:38Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2015-09-12T12:48:50Z","updated_at":"2016-02-04T20:15:39Z","closed_at":null,"body":"Hi there,\r\n\r\nWith ProKeys enabled, Google Inbox reaches 30-40% CPU usage on my system and becomes unresponsive after a few hours. All I need to do to reproduce this is open the Inbox tab and let it sit in the background.\r\n\r\nThis has also been noted here: https://www.reddit.com/r/chrome/comments/3a9jok/inbox_tab_eating_lots_of_cpu_on_desktop_but_not/ (the comments mention ProKeys).\r\n\r\nWould be happy to send any traces needed. Thank you for this useful tool! :)"},"comment":{"url":"https://api.github.com/repos/GaurangTandon/ProKeys/issues/comments/180029617","html_url":"https://github.com/GaurangTandon/ProKeys/issues/3#issuecomment-180029617","issue_url":"https://api.github.com/repos/GaurangTandon/ProKeys/issues/3","id":180029617,"user":{"login":"ezuk","id":1092548,"avatar_url":"https://avatars.githubusercontent.com/u/1092548?v=3","gravatar_id":"","url":"https://api.github.com/users/ezuk","html_url":"https://github.com/ezuk","followers_url":"https://api.github.com/users/ezuk/followers","following_url":"https://api.github.com/users/ezuk/following{/other_user}","gists_url":"https://api.github.com/users/ezuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ezuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezuk/subscriptions","organizations_url":"https://api.github.com/users/ezuk/orgs","repos_url":"https://api.github.com/users/ezuk/repos","events_url":"https://api.github.com/users/ezuk/events{/privacy}","received_events_url":"https://api.github.com/users/ezuk/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T20:15:37Z","updated_at":"2016-02-04T20:15:37Z","body":"Woot! Thank you, and thanks for the persistence! :)\n\nOn 4 February 2016 at 08:24, Gaurang Tandon <notifications@github.com>\nwrote:\n\n> Hi @ezuk <https://github.com/ezuk>,\n>\n> I am really sorry for the long delay (hopefully, you didn't uninstall\n> ProKeys by now ;)) but I have finally figured out the culprit:\n>\n> function isContentEditable(node){\n>     var tgN = node && node.tagName,\n>         attr, parentCount, parent;\n>\n>     // insanity checks first\n>     if(!node || tgN === \"TEXTAREA\" || tgN === \"INPUT\" || !node.getAttribute)\n>         return false;\n>     else{\n>         attr = node.getAttribute(\"contenteditable\");\n>\n>         // empty string to support <element contenteditable> markup\n>         if(attr === \"\" || attr === \"true\" || attr === \"plaintext-only\")\n>             return true;\n>\n>         // important part below\n>         // note that if we introduce a snippet\n>         // then it generates <span> elements in contenteditable `div`s\n>         // but they don't have content-editable true attribute\n>         // so they fail the test, hence, here is a new check for them\n>         // search if their parents are contenteditable\n>         // but only do this if the current node is not a textarea\n>         // which we have checked above\n>\n>         parentCount = 1; // only two parents allowed\n>         parent = node;\n>\n>         do{\n>             parent = parent.parentNode;\n>             parentCount++;\n>\n>             if(!parent) return false;\n>             if(isContentEditable(parent)) return true; // recursive call here\n>         }while(parentCount <= 2);\n>\n>         return false;\n>     }\n> }\n>\n> This function was recursive - with a *non ending condition*; so it went\n> on and on endlessly until it reached the top level element.\n>\n> I have fixed the bug in my local PC version. I will release the 2.8.0\n> update soon which implements this fix :)\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/GaurangTandon/ProKeys/issues/3#issuecomment-179832558>\n> .\n>\n"}}