Firefox CPU consumption jumps when mouse moves or scrolls

RESOLVED INCOMPLETE

Status

()

RESOLVED INCOMPLETE
5 years ago
3 years ago

People

(Reporter: f790234, Unassigned)

Tracking

({perf})

22 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212

Steps to reproduce:

Just move the mouse on any page, even about:blank

For the scrolling issue, build up a dummy HTML page that can be scrolled far enough for the test to be relevant. You don't need to embed images, you don't need CSS or Javascript either.



Everything is described in length on Mozilla's support forum:
https://support.mozilla.org/en-US/questions/948578


Actual results:

Ridiculous CPU consumption for such meaningless action.


Expected results:

Barely any increase in CPU consumption. I only have this issue in Firefox, no other program. Even an embedded Flash with focus doesn't have this issue, which probably makes WebGL less of an alternative if this isn't fixed.


- The scrolling sounds like a painting performance issue or something general that is not related to mouse.
- The movement issue seems to be partly caused by Firefox not supporting some mouse driver(s) correctly, and partly by something more general related to mouse handling.

See details in the support thread. ( https://support.mozilla.org/en-US/questions/948578 )
It's from January 2013 and Firefox 18.0.1 but the issue remain the same to this day with Firefox 22.
(Reporter)

Updated

5 years ago
Keywords: perf
(Reporter)

Comment 1

5 years ago
Note: The support thread has been opened for 5 months, 9 people said they have this problem out of 159 views.

So that affects 5.7% of people, probably less depending on how these 159 found the thread.

Comment 2

5 years ago
Did you try with smooth scrolling disabled in Firefox and with a different mouse?
Flags: needinfo?(f790234)
(Reporter)

Comment 3

5 years ago
Note that the scrolling issue occurs when I scroll fast. The faster I scroll, the more it consumes CPU. It's logical, but the numbers are kind of super high.

So firstly, disabling smooth scrolling helps a bit. With the mouse, CPU consumption while scrolling without moving the mouse drops from 40% to 25%. It gets back to 40% if I middle click and then scroll, probably because doing so forces smooth scrolling.

With the touchpad, scrolling without smooth scrolling takes about 30-35% as opposed to 40% with smooth.




Secondly, I did try with a different mouse. Unfortunately I don't have access to a spare mouse anymore if you need further testing. What happened with a new mouse is described in the last paragraph of "Pizzle's" (me) second reply in the support thread.

Quoting: "Touchpad definitely gives better results for cursor movement, although still higher than expected, so I found a new mouse to test. I used the same USB port and plugged in a Microsoft Wireless Mobile Mouse 3500. I got the same results as with the touchpad"

To sum up:
- Cursor movement with touchpad and the Microsoft mouse takes 10-15% CPU in Firefox (and barely anything in other programs)
- With the Essentiel B mouse, it's 40% in Firefox and still barely anything in other programs


Also, in the first post from the support thread, I said moving the Essentiel B mouse in Firefox's options pane takes 10-15% CPU instead of 40%. This is only true if the movement occurs above an empty zone such as the bottom half of the "Tabs" tab. Otherwise it's 40%. (note: it's 40% in an about:blank tab as well)
Flags: needinfo?(f790234)
(Reporter)

Comment 4

5 years ago
Oh, sorry for the additional comment, but for the sake of completeness:

- Mouse movement takes 30%, not 40%. 40% is for scrolling.

- The Microsoft mouse *probably* behaves like the touchpad for scrolling, like it does for movement. The scrolling problem seems to occur regardless of device, as opposed to the movement problem which "only" gets worse with my Essentiel B mouse

- The quote about the Microsoft mouse comes from the last post in the support thread, not the second.

Comment 5

5 years ago
Hi. I have experienced this bug for a year or two as well. I can replicate the effect on Ubuntu 10.04, Ubuntu 12.04, and Microsoft Windows 7. All OSes tested are 64 bit installs and I used multiple physical computers.

Simply moving the mouse causes a ~30% CPU usage increase.

Here is a performance profile of the effect on the newest available nightly build with a completely fresh profile with only the "about:blank" page open in one tab: http://people.mozilla.org/~bgirard/cleopatra/#report=1a6a750cdc8fd9b9f81a865e594ce4462ab1bebd

And here is a youtube video showing the effect for context: https://www.youtube.com/watch?v=CQVgeLnawuU

This test is done on an Intel Core2 Duo 6400+ which isn't top of the line, but it isn't slow either.

Comment 6

3 years ago
Jon, do you still see this?

I am unable to reproduce in win7 nightly build
Flags: needinfo?(f790234)
Whiteboard: [closeme 2015-10-10]

Comment 7

3 years ago
Resolved per whiteboard
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Flags: needinfo?(f790234)
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2015-10-10]
Component needed update to prevent this from continually appearing when it has been marked as Resolved-Incomplete
Component: Untriaged → Build Config
You need to log in before you can comment on or make changes to this bug.