[Webkit-unassigned] [Bug 180330] New: [GTK] WK2/JSC idle wakeups and CPU utilisation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 3 01:23:28 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=180330

            Bug ID: 180330
           Summary: [GTK] WK2/JSC idle wakeups and CPU utilisation
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: Gtk
          Severity: Normal
          Priority: P3
         Component: WebKit Gtk
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mike at vee.net
                CC: bugs-noreply at webkitgtk.org

Created attachment 328288

  --> https://bugs.webkit.org/attachment.cgi?id=328288&action=review

Sysprof file showing call traces when idle (first 1/2 of the trace)

Since porting Geary to WebKit2, I have noticed it seems to have been running hotter than previously when idle. This has also been reported by others in Bug 783025[0]. One person noticed using strace that when Geary is on the visible desktop, it is calling and returning from poll() at about 60 times per second, which is a substantial number of wakeups for an idle application. This seems to also occur for Epiphany, but not in other GTK+ apps such as Gitg, or Polari. Hence it looks like a WebKit2 issue.

I'm noticing it under Wayland, and have a query out in that bug as to whether others are seeing it under X11. The poll() rate decreases when it is not on the visible desktop, and I've managed to get the rate down a bit as well by ensuring Geary is not showing a WebView, but these aren't terribly useful workarounds. Geary is setting WEBKIT_DISABLE_COMPOSITING_MODE=1 in main() right after launching, but commenting that out doesn't seem to make any difference. I also tried commenting out the ~6 JS message handlers that Geary uses for displaying conversations, but that didn't help either.

Sysprof shows that most of the work being done when idle is in g_main_context_prepare() — 21% of the total, g_source_iter() — 17% of total, and magazine_cache_push_magazine (used by g_slice) — 12%. Most of the work being done by calls to g_source_iter are being made from libjavascriptcoregtk-4.0.so — accounting for 13% of the total work when idle.

Example strace showing polling is attached to Bug 783025, example sysprof of idle period is attached.

[0] - <https://bugzilla.gnome.org/show_bug.cgi?id=783025>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171203/37566fe3/attachment.html>


More information about the webkit-unassigned mailing list