Closed Bug 1650731 Opened 4 years ago Closed 2 years ago

Extremely high input latency with Mattermost

Categories

(Core :: Graphics: WebRender, defect, P3)

79 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: post+mozilla, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Attachments

(1 file)

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

Steps to reproduce:

  • Cause the system to have some background load. On my 8-core system (4 cores and hyperthreading), even just 4 nice'd jobs each using a full core are enough.
  • Go to Mattermost or Slack (other sites might also be affected)
  • Start typing in the chat box

Actual results:

The input latency is huge -- when I type a full sentence, I have to wait 2-5s until all characters appear on the screen.

Expected results:

Input latency should not skyrocket to well beyond 1s. Other sites (like this bugzilla) are much less of a problem; latency goes up a bit but stays well below 1s. In the past, it wasn't always this bad in Mattermost either (I did not use Slack back then) -- at some point however it became a big problem.

I captured a profile of high latency in Mattermost at https://share.firefox.dev/3gtkoVW.

Setting a component for this issuein order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3

FWIW, it seems this only really affects Mattermost, and not all websites in general -- or at least Mattermost is disproportionally affected. Also see https://github.com/mattermost/mattermost-server/issues/15012.

I verified that the issue also arises with a new fresh profile, but only if I enable WebRender. So it somehow seems to be related to WebRender.

Please open about:support, click on "Copy text to clipboard" and paste it here. Thanks!

Blocks: wr-linux
Component: Widget: Gtk → Graphics: WebRender
Keywords: perf
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

I think there actually are two separate problems:

  • One only occurs with WebRender, and needs high CPU load on most/all of my cores to trigger.
  • One occurs with any rendering backend, and only occurs when I am in a video call (Zoom or Jitsi or whatever). The CPU load is actually not that high here.

Let's keep this issue focused on Mattermost. Can you file a separate issue for the video call problem?

Also, can you grab a fresh profile with the "Firefox Graphics" preset? The profile that you did include has very large input lag, but it looks like all of that time is being spent running JS in Mattermost. It's hard to see how WebRender would make a difference there.

Summary: Extremely high input latency under background load → Extremely high input latency with Mattermost

I have now used this without Webrender for two weeks, and I did experience some slowdown in Mattermost under high background load without any video calls being involved. I am not sure what to make out of all this -- it is very hard to have a reproducible setup here (possibly not all background load is equal), and it seems likely to me that there are several issues here so I cannot tell what exactly is slowing down the browser in any given situation.

Anyway, here is another profile: https://share.firefox.dev/3l6WVfR

If there is no webrender indication here, then maybe what I reported 2 weeks ago was a fluke. I did go back and forth between webrender and non-webrender twice and the effect seemed reproducible, but now I cannot reproduce this any more (and anyway measuring input latency is quite subjective, at least I do not have the tools to say anything objective here -- I can just say whether it "feels laggy").

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → S3
Flags: needinfo?(jmathies) → needinfo?(jmuizelaar)
Blocks: wr-linux-perf
No longer blocks: wr-linux

Is this still an issue?

Flags: needinfo?(jmuizelaar) → needinfo?(post+mozilla)

This was fixed on the Mattermost side (https://github.com/mattermost/mattermost-server/issues/15012). Not sure if there is something Firefox could have done better.

Flags: needinfo?(post+mozilla)

Fixed, per comment 12.

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

Attachment

General

Creator:
Created:
Updated:
Size: