Bug 274218

Summary: [GTK] Spinners are shown indefinitely on HTML5 audio controls with preload=none, wasting power and CPU
Product: WebKit Reporter: Jeff Fortin <nekohayo>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, philn
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 245783    

Description Jeff Fortin 2024-05-15 10:07:11 PDT
The best test case I have to observe this issue is this page, where I have embedded a bunch of audio elements with preload="none":
https://luciegascon.com/discographie/
(just scroll down a bit to the first album at the top, where every track has an audio element).

On Epiphany 45 (Cairo) and Epiphany TP / Devel (Skia, WebKitGTK ), spinners are shown forever on each of the audio elements there, and this consumes roughly 10-30% of each CPU core, indefinitely; during that time, my laptop's CPU's frequencies oscillate between 800 and 1700 mhz (both when running the Skia or the Cairo version). Other pages on the same website are not affected, as they do not have audio elements, and they let the cores step down to 400mhz and CPU usage to fall to 0-2% according to gkrellm.

Notwithstanding the fact that it eats a non-negligible amount* of CPU, even on modern Intel Kabylake graphics on Wayland (it also happens on Xorg, and also happens with open source AMD graphics), I believe the spinners should not be shown in the first place, especially when preload="none" is used, as they will never stop spinning.

In comparison, Firefox does not show a spinner for those elements (it does not show spinners even with the default preload behavior, either).

----

*: (which would be a separate issue, but I have been unfortunately unable to capture anything with Sysprof here, as the browser will lock up entirely right after you try loading that page when the flatpak app is launched by Sysprof 46)