accumulator / Quickddit

Reddit client for Jolla's SailfishOS, Ubuntu Touch and Nokia N9
GNU General Public License v3.0
53 stars 21 forks source link

QtWebProcess continues consuming CPU when WebViewer no longer in use #45

Closed Thra11 closed 5 years ago

Thra11 commented 6 years ago

Tested on Sailfish. Use a tool to monitor CPU usage per process, such as top or lighthouse. In Quickddit, find an item which links to a website (especially noticeable for 'heavy' websites with lots of JavaScript). Touch the link icon, then swipe left to accept and open the link in Quickddit's internal webviewer. Check CPU usage: a new process called QtWebProcess has appeared. In Quickddit, swipe right to close the webview. Continue using Quickddit. Notice that the phone is getting hot and the battery is draining. Check process CPU usage: the QtWebProcess process is still there, and still consuming a high percentage of CPU time.

Closing and reopening Quickddit kills the rogue process, but of course forgets what you were looking at.

It could be worth keeping the web process running while you're still looking at the comments associated with the link, so you can flip back and forth, but once you leave that item, I think the process should be stopped.

accumulator commented 5 years ago

Unfortunately I cannot completely silence the QtWebProcess, so I decided to just fully unload the component when not active. This means it won't remember the page contents on subsequent visits anymore, but one could open the page in the external browser for those usecases.