Open Bug 1955509 Opened 7 months ago Updated 6 months ago

Constant CPU usage while idle on the Tiki.org website front page

Categories

(Core :: Performance: General, defect)

Firefox 136
Unspecified
Linux
defect

Tracking

()

UNCONFIRMED
Performance Impact ?

People

(Reporter: nekohayo, Unassigned, NeedInfo)

Details

To reproduce: visit https://tiki.org, wait for it to fully load (and animations to stop), then watch the CPU usage. In my case, it's constantly consuming 10-20% of a 8-cores Intel Kabylake i5-8350U.

Archive link, in case that page changes: https://web.archive.org/web/20250318104008/https://tiki.org/HomePage

This was tested on the GNOME 47.4 Wayland session on Fedora 41 with the built-in Intel GPU.


Corresponding issue in WebKitGTK: https://bugs.webkit.org/show_bug.cgi?id=290155

I am not entirely sure about this one; when I initially tested, it seemed like the CPU usage was higher, but on subsequent tries it seems to rather hover around the 3-6% CPU usage mark.

Hm, the tiki.org website is down now, and attempting to test on the archive bumps into a number of missing script errors; I'm not seeing any significant resource consumption on a windows or mac device, but the gone scripts might have been the culprit.

Marking as a linux-only S4 for now, rather than closing this outright--if you've observed high CPU consumption on other OSes with the same chipset, please add a comment here.

Severity: -- → S4
OS: Unspecified → Linux

The website appears to be back up. I don't see noticeable CPU (profiler says 0% for the content process in question). A performance profile with the Firefox profiler that shows this problem reproducing would be very helpful.

(AFAICT we do tick the refresh driver continuously while this page is in the foreground but I don't seen any JS on the stack to explain why that is and I wouldn't expect it to cause such heavy CPU use without leaving any other trace in the profile, which in my case I'm not seeing, so I'm assuming I'm not seeing the same thing as you).

Flags: needinfo?(nekohayo)

Hi Jeff, are you still seeing this? Are you able to help us gather a performance profile?

Hi there! Sorry for the delay.

I think I'm still seeing this, 5-10% undivided CPU usage (according to gnome-system-monitor) on Fedora 42's Firefox 137 RPM package, when that tab is open.

Here is a profiler recording with the "Power" preset, while idling in front of the fully-loaded archive.org version of that website: https://share.firefox.dev/3RnDTUw

This was recorded on my laptop with its Intel Kabylake graphics, on Wayland, with Mutter 48.x which includes dynamic double/triple buffering.

Flags: needinfo?(nekohayo)

Bah, I was out for medical stuff when the profile was added here so this dropped off my radar, and now I'm out for my first proper break in 6 months...

I had a quick look at the profile but I don't really know where to go from there. It shows the refresh driver ticking but I can't tell from the profile why. It doesn't include CPU usage info (maybe because of the "power" preset? I don't know for sure. It does seem to also mean there's no actual info on what JS/C++ was running...)

Florian or Markus, can you help triage? Thanks!

Performance Impact: --- → ?
Flags: needinfo?(mstange.moz)
Flags: needinfo?(florian)

The profile from comment 5 shows that the RefreshDriver keeps asking for new ticks from within MostRecentRefresh. This code was changed recently in bug 1961687 (thanks Emilio!) but the issue persists. New profile: https://share.firefox.dev/3SdBonO

Now the ticks are caused by CSSAnimation::Tick. However, the "CSS animation" markers in the profiler all stop after the spinny animation has stopped spinning. So what animation are we ticking for? Are we missing some animation markers?

Flags: needinfo?(mstange.moz) → needinfo?(hikezoe.birchill)

I think the animation in question is this one;

l.honeycomb {
  animation: r 4s forwards;

Since the animation-fill-mode is fowards the animation keeps running there.

Though I am totally unsure how WebKit avoid it, commitStyles was introduced to avoid this kind of situations.

Flags: needinfo?(hikezoe.birchill)

There is an animation marker for the r animation in the profile, but it ends after 4 seconds. Is the marker wrong?

Component: Performance → Performance: General
Product: Firefox → Core

The following css is infinitely animated.

.text-anim-content-list {
margin-top: 0;
padding-left: 110px;
text-align: left;
list-style: none;
-webkit-animation-name: change;
-webkit-animation-duration: 20s;
-webkit-animation-iteration-count: infinite;
animation-name: change;
animation-duration: 20s;
animation-iteration-count: infinite;
}

You need to log in before you can comment on or make changes to this bug.