[wplug] Mousewheel and your CPU

J Aaron Farr jaaronfarr at yahoo.com
Tue Nov 19 19:05:45 EST 2002


Hello.

Does anyone notice rather high CPU usage when scrolling through a long
document with a mouse wheel?  Specifically when using Mozilla?

I noticed it because while scrolling through long web sites, XMMS (and
consequently my music) would stall briefly every now and then.  At first
I thought it was the quality of my recordings, but then I noticed it
always stalled (hiccuped is probably a better term) whenever I was
scrolling with the mouse wheel.  I did some informal tests and this is
what I found:

Actions tested:
1. Scrolling with a mouse wheel
2. Dragging the scroll bar slider
3. Selecting the down or up arrow on a scroll bar

I tested these in the following applications:
1. Mozilla
2. Evolution
3. Emacs
4. Konqueror

If you can't tell by now, this wasn't a very scientific experiment, but
I got the following results:

Regardless of the application, the actions, in order of CPU usage, lined
up as listed above.  The up/down button gives you a constant slow
scroll, which used the least CPU.  For the other two, the CPU usage
depended on your speed, but generally speaking, using the mouse wheel
always took more CPU usage.

The applications each handled this a little differently (I think emacs
did the best), but only Mozilla really killed the CPU.

Now, you may be thinking at this point that I don't have nearly enough
to do but unfortunately the opposite is quite true.  I wouldn't care
about it if it didn't interrupt my music when I browse web sites.  So
I'm wondering if anyone else has ever seen this same phenomenon and/or
has an idea for a fix.  Would it be something specific to Mozilla or
more generally related to how Linux handles mouse wheel scrolling
events?  For the record, I'm running Gnome 2.0 in RedHat 8.0.

-- 
  jaaron    <jaaronfarr at yahoo.com>




More information about the wplug mailing list