Bug 263695 - REGRESSION: excessive wakeups/polling due to ThreadedCompositor::DisplayUpdate
Summary: REGRESSION: excessive wakeups/polling due to ThreadedCompositor::DisplayUpdate
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Compositing (show other bugs)
Version: Other
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-10-25 16:14 PDT by Tomáš Janoušek
Modified: 2023-11-01 16:15 PDT (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 Tomáš Janoušek 2023-10-25 16:14:21 PDT
A couple years ago I reported https://bugs.webkit.org/show_bug.cgi?id=210561 which was promptly fixed by Carlos, but I'm seeing a similar behaviour again in WebKitGTK 2.42.1. Every single WebKitWebProcess is waking up 60 times per second on my laptop, preventing the CPU from spending as much time in low-power states as it could.

Reproduction steps are exactly the same as in the aforementioned issue: I'm mainly experiencing this in liferea (RSS reader), but "surf about:blank" is the minimal reproducer. stracing the WebKitWebProcess shows regular 16/17 ms polling.
Using gdb, I tracked it down to the "[WebKit] ThreadedCompositor::DisplayUpdate" timer, which seems to be unconditionally firing 60 times per second. Looks like that was introduced this year in https://bugs.webkit.org/show_bug.cgi?id=252467, https://github.com/WebKit/WebKit/commit/06b9ec1834d27a4fb8a324e29908ed274305620a. Author and reviewer (Carlos) ccd.
Comment 1 Carlos Garcia Campos 2023-10-26 00:28:44 PDT
I think this one is caused by the update timer introduced to fix scrolling performance issues. For some reason we keep it enabled in some cases. We have already removed it in main, but 2.42 needs a fix to ensure it only runs when needed.
Comment 2 Radar WebKit Bug Importer 2023-11-01 16:15:14 PDT
<rdar://problem/117821075>