<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>245427</bug_id>
          
          <creation_ts>2022-09-20 08:17:23 -0700</creation_ts>
          <short_desc>[GTK] High CPU usage when the browser window is in the background</short_desc>
          <delta_ts>2022-12-15 03:17:55 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>svillar</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1899818</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2022-09-20 08:17:23 -0700</bug_when>
    <thetext>I&apos;m using epiphany 3.38.2 to access a chat webapp, which I normally have open but in the background when I&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899844</commentid>
    <comment_count>1</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2022-09-20 09:40:42 -0700</bug_when>
    <thetext>hmmm I&apos;m not so sure that this didn&apos;t happen with 2.36 already...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900328</commentid>
    <comment_count>2</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-09-22 01:27:54 -0700</bug_when>
    <thetext>(In reply to Alberto Garcia from comment #0)
&gt; I&apos;m using epiphany 3.38.2 to access a chat webapp, which I normally have
&gt; open but in the background when I&apos;m not using it.
&gt; 

Possible to reproduce with MiniBrowser?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900584</commentid>
    <comment_count>3</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2022-09-23 03:07:25 -0700</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #2)
&gt; Possible to reproduce with MiniBrowser?

Yes, here&apos;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
[...]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900594</commentid>
    <comment_count>4</comment_count>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2022-09-23 04:14:59 -0700</bug_when>
    <thetext>FWIW I&apos;m getting similar results with epy 42.4 but I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919510</commentid>
    <comment_count>5</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2022-12-15 03:17:55 -0800</bug_when>
    <thetext>Still happening with 2.39.3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>