<?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>251016</bug_id>
          
          <creation_ts>2023-01-23 09:15:41 -0800</creation_ts>
          <short_desc>[GTK] Youtube dark theme&apos;s &quot;Ambient Mode&quot; creates extreme slowness, destroys playback and UI performance on Epiphany</short_desc>
          <delta_ts>2024-05-14 21:22:44 -0700</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>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=248224</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Performance</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>245783</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeff Fortin">nekohayo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>kdwkleung</cc>
    
    <cc>the.bull</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1927475</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff Fortin">nekohayo</who>
    <bug_when>2023-01-23 09:15:41 -0800</bug_when>
    <thetext>Test case: playing https://www.youtube.com/watch?v=mBw7vkcQOew in 1080p and above resolutions (&quot;stats for nerds&quot; reveals it is playing using the VP9 codec on my computer)

Here are the specs and parameters of my main testing computer (but it was observed on various other people&apos;s computers as well, particularly on HiDPI screens):

* HP Spectre X360 laptop (15&quot; 2018 model) with 4K HiDPI display, featuring an 8th generation (Kabylake) Intel Core i7 CPU and the associated intel graphics chipset, 16 GB of RAM and NVMe SSD
* Running on the Wayland GNOME session on Fedora 37, with GNOME&apos;s night light &amp; dark mode turned off (just to make sure this can&apos;t interfere)
* Testing with the &quot;technology preview&quot; Epiphany Devel flatpak package from the gnome-nightly repository for consistency/simplicity

---

## Reproduction

1. Go to https://www.youtube.com/watch?v=mBw7vkcQOew (or any YouTube video page, really) with Epiphany 44 and use the top-right YouTube menu to turn on dark mode
2. Now that dark mode is turned on, click the cogwheel in the video player&apos;s toolbar to access the &quot;Ambient Mode&quot; toggle, and make sure it is turned on
3. Try to play the video for more than 10 seconds, or to interact with any part of the UI.

## Results

* Pretty slow on non-HiDPI (ex: 1920x1080) screens, noticeably more than if Ambient Mode is turned off
* Downright unusable when running on a HiDPI (ex: 4K) screen: sidebar thumbnails load very slowly, any interaction with the YouTube UI (even just trying to reopen the top-right menu to turn dark mode off) is nearly impossible as every single click takes somewhere like 20 to 60 seconds to happen (I didn&apos;t bother timing with a stopwatch, because it&apos;s painful enough to test this and try to escape the death grind), video playback cannot happen reliably, CPU is eaten alive and laptop fans are on full blast.

---

Note: this is different from bug #248224 because what I&apos;m observing here is specifically about Ambient Mode being turned on, and it&apos;s not just scrolling performance nor just playback nor just UI, it&apos;s all of them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2035453</commentid>
    <comment_count>1</comment_count>
    <who name="Kdwk">kdwkleung</who>
    <bug_when>2024-05-14 21:22:44 -0700</bug_when>
    <thetext>This should be fixed in WebKitGTK 2.45.x thanks to Skia. It might be worth retesting.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>