{"action":"opened","issue":{"url":"https://api.github.com/repos/nextcloud/desktop/issues/964","repository_url":"https://api.github.com/repos/nextcloud/desktop","labels_url":"https://api.github.com/repos/nextcloud/desktop/issues/964/labels{/name}","comments_url":"https://api.github.com/repos/nextcloud/desktop/issues/964/comments","events_url":"https://api.github.com/repos/nextcloud/desktop/issues/964/events","html_url":"https://github.com/nextcloud/desktop/issues/964","id":392925453,"node_id":"MDU6SXNzdWUzOTI5MjU0NTM=","number":964,"title":"Unreasonable CPU usage","user":{"login":"zhccsd","id":19645801,"node_id":"MDQ6VXNlcjE5NjQ1ODAx","avatar_url":"https://avatars2.githubusercontent.com/u/19645801?v=4","gravatar_id":"","url":"https://api.github.com/users/zhccsd","html_url":"https://github.com/zhccsd","followers_url":"https://api.github.com/users/zhccsd/followers","following_url":"https://api.github.com/users/zhccsd/following{/other_user}","gists_url":"https://api.github.com/users/zhccsd/gists{/gist_id}","starred_url":"https://api.github.com/users/zhccsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhccsd/subscriptions","organizations_url":"https://api.github.com/users/zhccsd/orgs","repos_url":"https://api.github.com/users/zhccsd/repos","events_url":"https://api.github.com/users/zhccsd/events{/privacy}","received_events_url":"https://api.github.com/users/zhccsd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-20T07:39:50Z","updated_at":"2018-12-20T07:39:50Z","closed_at":null,"author_association":"NONE","body":"### Expected behaviour\r\n0 CPU Usage\r\n\r\n### Actual behaviour\r\n10%-15% CPU Usage\r\n\r\n### Steps to reproduce\r\n1.Start Nextcloud 2.5.1final\r\n2.Do nothing\r\n\r\n### Client configuration\r\nClient version:2.5.1final\r\nOperating system:Windows 7\r\nOS language:Chinese Simplified\r\nInstallation path of client:C:\\Program Files (x86)\\Nextcloud\r\n\r\n### But\r\nIf i open \"Add User\" window,select \"Apply from provider\",wait for the web page loaded,then CPU usage became 0\r\n\r\n### Guess\r\nThen i guess this might be the same QtWebengine issue i meet before.\r\nUnfortunately i didn't find any useful information about that issue.\r\nThe only thing i find is:If you used QtWebengine in app but not realy show it ,you get high cpu usage.\r\n\r\n### Here is my approach\r\ncreate a window,and in its constructor:\r\n```\r\nsetWindowFlags(Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);\r\nsetAttribute(Qt::WA_TranslucentBackground);\r\nsetFixedSize(1, 1);\r\nQWebEngineView *view = new QWebEngineView(this);\r\nview->setVisible(false);\r\nview->load(QUrl(\"about://blank\"));\r\nconnect(view, &QWebEngineView::loadFinished, [&]()->void\r\n{\r\n    hide();\r\n});\r\n```\r\nThen it did the trick.\r\n\r\nHope this helps\r\n"}}
{"actor":{"display_login":"zhccsd"}}