Bug 245427 - [GTK] High CPU usage when the browser window is in the background
Summary: [GTK] High CPU usage when the browser window is in the background
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-20 08:17 PDT by Alberto Garcia
Modified: 2022-12-15 03:17 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Garcia 2022-09-20 08:17:23 PDT
I'm using epiphany 3.38.2 to access a chat webapp, which I normally have open but in the background when I'm not using it.

Since I upgraded to WebKitGTK 2.38.0 I notice that the browser starts to use a lot of CPU when it should be mostly idle. The problem seems to happen (this is my guess) when there's new activity in the chat room and disappears when I focus the browser window.

perf-top shows fast_composite_scaled_bilinear_sse2_8888_8_8888_none_OVER as the top symbol in the UI process, and the web process is constantly running different WebCore and JSC functions.
Comment 1 Alberto Garcia 2022-09-20 09:40:42 PDT
hmmm I'm not so sure that this didn't happen with 2.36 already...
Comment 2 Zan Dobersek 2022-09-22 01:27:54 PDT
(In reply to Alberto Garcia from comment #0)
> I'm using epiphany 3.38.2 to access a chat webapp, which I normally have
> open but in the background when I'm not using it.
> 

Possible to reproduce with MiniBrowser?
Comment 3 Alberto Garcia 2022-09-23 03:07:25 PDT
(In reply to Zan Dobersek from comment #2)
> Possible to reproduce with MiniBrowser?

Yes, here's perf-top --sort=comm,dso

UI process:
  46.14%  MiniBrowser     libc-2.31.so
  25.47%  MiniBrowser     libpixman-1.so.0.40.0
   6.17%  MiniBrowser     radeonsi_dri.so
   5.37%  MiniBrowser     [kernel]
   3.55%  MiniBrowse:cs0  [kernel]
   3.03%  MiniBrowser     libcairo.so.2.11600.0
   1.98%  MiniBrowser     libglib-2.0.so.0.6600.8
   1.38%  MiniBrowser     libgtk-3.so.0.2404.20
   1.24%  MiniBrowser     libgdk-3.so.0.2404.20
   0.71%  MiniBrowser     libgobject-2.0.so.0.6600.8
   0.59%  MiniBrowser     libwayland-server.so.0.1.0
[...]

Web Process:
  18.05%  eadedCompositor  radeonsi_dri.so
  16.01%  WebKitWebProces  [kernel]
  14.36%  eadedCompositor  libwebkit2gtk-4.0.so.37.57.3
  13.94%  WebKitWebProces  libc-2.31.so
   8.03%  WebKitWe:gdrv0   radeonsi_dri.so
   6.26%  WebKitWebP:cs0   [kernel]
   4.69%  eadedCompositor  [kernel]
   3.55%  ReceiveQueue     libjavascriptcoregtk-4.0.so.18.21.3
   2.38%  WebKitWebProces  libwebkit2gtk-4.0.so.37.57.3
   1.68%  eadedCompositor  libc-2.31.so
   1.43%  eadedCompositor  libjavascriptcoregtk-4.0.so.18.21.3
[...]
Comment 4 Sergio Villar Senin 2022-09-23 04:14:59 PDT
FWIW I'm getting similar results with epy 42.4 but I've been observing this for a while. This is the perf top for the epiphany process alone

  31,98%  epiphany  libpixman-1.so.0.40.0                                                                                             
  16,62%  epiphany  libc.so.6                                                                                                         
   3,18%  epiphany  [kernel]                                                                                                         
   2,25%  epiphany  libcairo.so.2.11600.0                                                                                             
   1,22%  epiphany  iris_dri.so                                                                                                       
   0,96%  epiphany  libglib-2.0.so.0.7200.3                                                                                           
   0,87%  epiphany  libgtk-3.so.0.2404.30                                                                                             
   0,45%  epiphany  libgdk-3.so.0.2404.30                                                                                             
   0,34%  epiphany  libgobject-2.0.so.0.7200.3                                                                                        
   0,13%  epiphany  [unknown]                                                                                                         

WebProcess is low in the list of global offenders with ~2% of total CPU usage.
Comment 5 Alberto Garcia 2022-12-15 03:17:55 PST
Still happening with 2.39.3