ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Firefox CPU usage

<< < (3/3)

TaoPhoenix:
I have a bit more data.

Both AdBlock and Simple AdBlock seem to chew up some CPU power doing their thing.

I took a hand at putting in a trial of AdMuncher + Ghostery again after I took it out for other reasons, and I am def. seeing a CPU improvement. I don't expect miracles, but maybe the AdBlock type addons have to examine the page to see what to block, and Monster.com according to Ghostery is a pretty heavy page. (Facebook Connect?! Eew! And other barely less evil pulls.) '

Edit: I'm back on Mainline 17.01, not Beta 18.0, not that I think it really matters.



f0dder:
I haven't looked at how Ghostery does it's blocking, but AdBlock uses regular expressions - the more blocklists you've added, the more regexes it has to chew through. Some REs are (relatively) cheap, some can be very expensive - so the time ABP chews up depends a lot on the nature of your blocklist.

Dunno how exactly ABP works with firefox, but in theory it only has to look at HTML content - AdMuncher has to intercept all HTTP traffic and parse it - and I'd expect it to work with regexes as well. So if you fed it the same the exact same blocklists as ABP, it ought to be slightly slower.

The above is purely guesses, though, AM might well be implemented differently or have a more efficient regex engine. I do seem to recall that the developer used to frequent some of the same IRC channels as me, which indicates an obsession with efficiency :)

4wd:
If you type about:about in Firefox you'll get a list of About, (DUH!), pages you can look at for possible diagnostic info.

eg.
about:cache   (current cache in use)
about:memory (memory being used by FF processes and each page open)
about:support (diagnostic info, what's enabled, etc)

Firefox CPU usage

Dunno how exactly ABP works with firefox, but in theory it only has to look at HTML content - AdMuncher has to intercept all HTTP traffic and parse it - and I'd expect it to work with regexes as well. So if you fed it the same the exact same blocklists as ABP, it ought to be slightly slower.-f0dder (December 22, 2012, 06:42 PM)
--- End quote ---

Wouldn't there be more of hit with ABP since it has to use FF/PM/etc to get the pages, then parse them and is written in Java, (I think - probably wrong), whereas AdMuncher could be written in a more efficient language and applies the RegEx as it streams data through its proxy?

(I don't know, just wondering.)

f0dder:
Wouldn't there be more of hit with ABP since it has to use FF/PM/etc to get the pages, then parse them and is written in Java, (I think - probably wrong), whereas AdMuncher could be written in a more efficient language and applies the RegEx as it streams data through its proxy?-4wd (December 22, 2012, 07:01 PM)
--- End quote ---
JavaScript, not Java! - the two have almost nothing in common. (I'd say java is generally a bit more efficient than JS, but JS JITters have improved a lot lately, and benefit from being directly baked in the browser rather than launching a separate VM and all that) - and while C++ (and assembly, as parts of AM is afaik) can be truckloads more efficient than other languages, browser extensions have access to a more direct representation of what's going on, whereas AM works as a proxy that has to do extra parsing - and, at least in theory, the really heavy-lifting work (the regex engine) of ABP could easily be implemented in lowlevel code (probably builtin firefox library?).

There's a lot of guesstimates in the above, though, and I could very easily be wrong! - at any rate, a long list of sloppy regexes are going to kill performance no matter what the underlying language is :)

MrCrispy:
I wish Firefox had a SIMPLE counter about memory and cpu being consumed by each tab/extension/window. Not sure if this is possible without each tab being an individual process (which leads to the Chrome nightmare of multiple running exe's), and even then XUL is still shared right?

The current situation is unmanageable. I am a heavy user - right now I have Waterfix x64 with about 60+ tabs (out of which about half are loaded), 20+ extensions. a bunch of styles and scripts etc. This is on a fairly decent pc - Q6600 with 6GB Ram, so it shouldn't slow down. Yet, completely out of the blue, cpu will spike to 40-60%, then fall back sometimes, other times it stays high.

The only 'fix' is to restart the browser (which causes everything to be unloaded except 1 tab), and play the extension game - selectively enable/disable each one, and restart. This is not fun.

Navigation

[0] Message Index

[*] Previous page

Go to full version