[webkit-gtk] WK2/JSC idle wakeups and CPU utilisation
Carlos Garcia Campos
cgarcia at igalia.com
Sun Dec 3 01:02:26 PST 2017
El dom, 03-12-2017 a las 13:44 +1100, Michael Gratton escribió:
> Hi all,
> Since porting Geary to WebKit2, I have noticed it seems to have been
> running hotter than previously when idle. This has also been
> by others in Bug 783025. One person noticed using strace that
> Geary is on the visible desktop, it is calling and returning from
> poll() at about 60 times per second, which is a substantial number
> wakeups for an idle application.
60 times per second and when visible sounds like the paint timer.
> This seems to also occur for Epiphany,
> but not in other GTK+ apps such as Gitg, or Polari. Hence it looks
> a WebKit2 issue.
Doesn't gitg use webkit2 as well?
> I'm noticing it under Wayland, and have a query out in that bug as
> whether others are seeing it under X11. The poll() rate decreases
> it is not on the visible desktop, and I've managed to get the rate
> 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,
> commenting that out doesn't seem to make any difference.
Please don't do that, the env var is not expected to be used by
applications, only for users/developers as a debug tool. Use
> 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
> work when idle.
> Is this to be expected or is it a bug?
File bug report, please. If you can attach strace, sysprof, etc output
and anything else that could help to identify the source of the wake
>  - <https://bugzilla.gnome.org/show_bug.cgi?id=783025>
Carlos Garcia Campos
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195 bytes
Desc: This is a digitally signed message part
More information about the webkit-gtk