Open Bug 1983354 Opened 6 months ago Updated 5 months ago

Lag spike after same page navigation (history.pushState)

Categories

(Core :: Performance: Responsiveness, defect)

Firefox 141
defect

Tracking

()

UNCONFIRMED

People

(Reporter: ginnythecat, Unassigned, NeedInfo)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0

Steps to reproduce:

I first experienced this when building a map website, but it's also noticable on Google Maps for example when moving around. Doing a performance profile of the page shows it janking 100% on sqlite queries in the stacktrace that look related to pushing the navigation item into the history.

I managed to build a simple reproduction of this and attached a screen recording below. On a friends computer the lag is less noticable but still there.

<!doctype html>
<html>

<body>
<div></div>

<style>

div {
width: 100px;
height: 100px;
background: red;
animation: rotate 5s infinite linear;
}

@keyframes rotate {
from {
transform: rotate(0deg);
}

to {
	transform: rotate(360deg);
}

}
</style>

<script>

setInterval(() => {
history.pushState({}, "", "#" + Math.random());
}, 2 * 1000);
</script>
</body>

</html>

My computer is running Fedora 42/Wayland on a Intel i7-7500 (not the newest, but it shouldn't lag this much).

Actual results:

The screen freezes for about a 400ms every 2 seconds pretty consistently and the Firefox profiles classifies it as "jank"

Expected results:

Not screen freeze should happen.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Component: Widget: Gtk → Performance: Responsiveness

The severity field is not set for this bug.
:mstange, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mstange.moz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: