High CPU usage on Firefox viewing forum threads

kyuupichan

Member
Oct 3, 2015
95
348
As in the title. It seems to chew up a whole core. When viewing other parts of the site other than a discussion thread, or when the tab is not the active tab, the CPU usage stops.

It even happens viewing this thread.
 

Bloomie

Administrator
Staff member
Aug 19, 2015
511
803
What OS and Firefox version are you using? Any plugins enabled that could be clashing with forum's script?
 

kyuupichan

Member
Oct 3, 2015
95
348
Something similar happens on Chrome, but it seems the CPU usage is moving between execution threads on Chrome, whereas in Firefox it stays on the same thread.

DragonFly BSD; Firefox 40.0.3.
Only plugin is "OpenH264 Video Codec provided by Cisco Systems, Inc.".



Disabling the plugin and restarting made no difference.
 

sickpig

Active Member
Aug 28, 2015
926
2,541
Can confirm. OS: ubuntu 14.04, Firefox 43.0 (dev edition).

Even on this page as soon as I start scrolling the CPU usage start ramping up immediately and goes back to normal as soon as stop scrolling. It happens also with no imgur "bad" links on the page.

While scrolling in the Firefox dev console I see a lot of lines like that:

Code:
reflow: 0.55ms function n.expr.filters.hidden, jquery.min.js line 4
reflow: 0.49ms function uix.viewport.get, functions.min.js line 3
reflow: 0.5ms function n.expr.filters.hidden, jquery.min.js line 4
reflow: 0.57ms function uix.viewport.get, functions.min.js line 3
reflow: 0.5ms function n.expr.filters.hidden, jquery.min.js line 4
reflow: 0.5ms function uix.viewport.get, functions.min.js line 3
reflow: 0.6ms function n.expr.filters.hidden, jquery.min.js line 4
reflow: 0.58ms function uix.viewport.get, functions.min.js line 3
reflow: 0.54ms function n.expr.filters.hidden, jquery.min.js line 4
reflow: 0.49ms function uix.viewport.get, functions.min.js line 3
reflow: 0.63ms function n.expr.filters.hidden, jquery.min.js line 4
 

Bloomie

Administrator
Staff member
Aug 19, 2015
511
803
@kyuupichan OK thanks. I don't have a BSD system right now to replicate this unfortunately.

@sickpig those scripts are fairly light and should not degrade performance noticeably. Do you have access to a stable Firefox build on Ubuntu?

Anyone on Windows or Mac having these issues?
 

sickpig

Active Member
Aug 28, 2015
926
2,541
@Bloomie away from my main workstation at the moment, I'll do some more test tomorrow with stable version of firefox and even chrome. I could even try those under virtual windows xp box.

Now that I think about it could be related to xorg video card driver. @kyuupichan which kind of video device do you have? does DragonFly run xorg or some other sys?
 

sickpig

Active Member
Aug 28, 2015
926
2,541
@sickpig those scripts are fairly light and should not degrade performance noticeably. Do you have access to a stable Firefox build on Ubuntu?

Anyone on Windows or Mac having these issues?
I tried both stable version of chrome (45) and firefox (41) on virtualized winxp box (2GB RAM / 2 vCPU).

Same result: if you scroll on a page with your mouse wheel quite quickly the cpu usage ramp up almost instantaneously.

chrome behaves a little bit better (less cpu load, ~70%), on the other hand firefox usually reach 95-100%.

Mind you you I didn't notice any slowdown of the system it self, I've to look to the cpu monitor to get an idea of the load. I've performed the two test while my machines was mostly idle, though.

@Bloomie are you able to reproduce the problem?
 

Bloomie

Administrator
Staff member
Aug 19, 2015
511
803
If it has no effect on performance, then this is just how the system is allocating resources given the current usage. These results will be hard to compare across different setups, especially since you're running your browsers in a virtualized environment, and Windows XP is hardly a priority for Google or Mozilla anymore (both are discontinuing support in a couple months).
 

sickpig

Active Member
Aug 28, 2015
926
2,541
@Bloomie It does have effect on performance on my machine as soon as your box is busy doing other tasks. The cpu time is real. The thing is that *if* your workstation is mostly idle then you wan't notice.

That said, you're probably right thinking that this is a path not worth pursuing since the annoyance caused by this problem it's not so harmful.

Lastly I've used a virtualised winxp box just because it was the only ms system I have at my disposal at the moment.