Closed Bug 1887847 Opened 1 year ago Closed 1 year ago

Keyboard input very laggy on serveral sites

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 124
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: manuel.razola, Unassigned)

Details

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

Steps to reproduce:

This happens on several sites, but quickly reproducible on gmail:
Compose new message, go to the message body.
Press and hold any key

Actual results:

Heavy input lag. Specially annoying when holding backspace and trying to delete some text.

Expected results:

Other browsers don't have any issue

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Hi Manuel,

thank you for your report. Unfortunately, I could not reproduce this on GMail (Ubuntu 23.10, both Firefox 124 and today's Nightly). There was no visible input delay neither when typing nor deleting text. I also looked into a performance profile and could not see anything suspicious.

Could you use the Firefox profiler to record a profile of the situation?
(If you record the profile on GMail be sure that you don't expose personal information by accident, eg. exclude Screenshots)

Thanks,
Jan

Flags: needinfo?(manuel.razola)

Thanks Jan for the fast response!
Here you have:
https://share.firefox.dev/3IVj6Dw

Flags: needinfo?(manuel.razola)

https://share.firefox.dev/3TP05sy
And another sample.
Problem is while holding any key, it gets totally freezed and unresponsive

Thank you for the profiles! Unfortunately I don't see anything there that would be directly responsible for this. There is a very small (50ms-ish) section in the beginning where the event loop is busy, but that just seems to be the JIT compiler. After that, there's no high load, at least on Firefox's side.
Is your system maybe on a high load from other tasks? Do you have any external tools that might interfere (IME, keylogger, ...) which introduce the delay before it reaches Firefox?

Masayuki, do you have other ideas?

Flags: needinfo?(masayuki)
Flags: needinfo?(manuel.razola)
Severity: -- → S3

No IME nor keylogger. Actually, the system is not on a high load, neither it spikes any CPU while the input gets "freezed".
Will try by reinstalling firefox, see what happens.

Flags: needinfo?(manuel.razola)

I have no idea from the profile. On Linux, even some Western language keyboard layouts are implemented as IME, e.g., for supporting dead keys. And IME on Linux may use IME own process to make the conversion program isolated from the focused application. If it takes too long in the IME process, it won't appear in our profiler's result.

Flags: needinfo?(masayuki)

Updating to Firefox 126 fixed the issue.

Thank you for confirming. It would have been nice to know what the actual issue was, but it’s good it’s fixed. :)
I’m closing this, feel free to reopen if this comes up again!

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.