Excessive memory usage

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Cop
Posts: 1
Joined: Sat Apr 14, 2012 5:11 pm

Excessive memory usage

Post by Cop »

Hi,

recently I got a couple of memory problems with Firefox, which I fixed by disabling some extensions. One big memory-eater was ABP. It used about 100MB of Ram. Am I doing something wrong or is it normal for ABP to have such a high memory usage?
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Excessive memory usage

Post by lewisje »

It depends on how many subscriptions you use and how big they are, but that level of RAM usage is not unheard of.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
User avatar
Hubird
Posts: 2850
Joined: Thu Oct 26, 2006 2:59 pm
Location: Australia
Contact:

Re: Excessive memory usage

Post by Hubird »

And in my opinion 100mb is a small price to pay for all the benefits of ABP.

You can probably gain an extra 100mb or more by disable unneeded programs that start with Windows (Autoruns is very good for this).
andrea.ippo

Re: Excessive memory usage

Post by andrea.ippo »

I'm experiencing the same, 50-100 MB of RAM used by ABP alone with 1-2 subscriptions (EasyList + Fanboy). Considering that my Firefox uses 200-400 MB on its own for my browsing habits, the 100 MB of extra memory usage by ABP increases the overall usage by 25-50%!
I don't know how the filters are represented in-memory, but pasting the easylist filters to a text editor gave me a file of just 500k...
Is there some work in progress for making the filter subscriptions more memory efficient or are they already efficient as they'll ever be?

Thanks
Guest

Re: Excessive memory usage

Post by Guest »

andrea.ippo wrote:I'm experiencing the same, 50-100 MB of RAM used by ABP alone with 1-2 subscriptions (EasyList + Fanboy). Considering that my Firefox uses 200-400 MB on its own for my browsing habits, the 100 MB of extra memory usage by ABP increases the overall usage by 25-50%!
I don't know how the filters are represented in-memory, but pasting the easylist filters to a text editor gave me a file of just 500k...
Is there some work in progress for making the filter subscriptions more memory efficient or are they already efficient as they'll ever be?

Thanks
500KB of text filters is not the same thing as the in-memory size of the data structures.

ABP is trading memory for speed. Yes, memory usage could be lowered, but you'd pay a CPU penalty for it.
User avatar
Hubird
Posts: 2850
Joined: Thu Oct 26, 2006 2:59 pm
Location: Australia
Contact:

Re: Excessive memory usage

Post by Hubird »

Also using multiple overlapping subscriptions will increase your memory usage.
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Excessive memory usage

Post by lewisje »

Hubird wrote:Also using multiple overlapping subscriptions will increase your memory usage.
More pointedly, the gain in actual coverage will pale in comparison to the gain in memory usage, and false positives will become more numerous and harder to diagnose; issues like these are why both the forums and the main site advise against the practice.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Jaawn

Re: Excessive memory usage

Post by Jaawn »

Actually, through some quick investigation, it looks like ABP's memory usage has very little to do with what filters you have. With EasyList and Fanboy enabled, ABP was using ~100MB of RAM on my PC as others have said. Disabling all of the filters and using the "disable everywhere" option in ABP only dropped its memory usage down to ~75-80MB...while it shouldn't have been doing anything! No loaded filters, and "disabled everywhere", even after a browser restart ABP was still using ~75MB of RAM.

I did this test using Firefox 16.01 with no other add-ons. If I disable ABP through Firefox's add-ons panel, the 75MB of RAM is no longer used.

So, there DOES appear to be an excessive RAM usage issue in ABP that is unrelated to enabled filters, just merely the add-on itself is using too much RAM. I think it warrants investigation. Simply saying "100MB is a small price to pay for the benefits" isn't really adequate. I disagree. Even by today's standards, 100MB is a lot of memory for a single application, let alone a browser add-on (it is MORE than FIREFOX's memory footprint...the actual browser.....)

It should be fixed, not dismissed.
chrcoluk

Re: Excessive memory usage

Post by chrcoluk »

I only have easylist (both privacy and ad blocking) and here is my figures.

Base firefox usage with my normal session approx 300-400meg ram, with adblock plus but no filters 350-450 so extra 50meg, with easylist here it comes..... 750-1000 on average.

On a new session which started with no pages loaded, no adblock is about 150-500 (ram usage goes up fairly quickly in firefox not sure how people report such low figures) with adblock plus loaded and no filters it didnt go up much but as soon as I enabled easylist the ram usage went up by 300meg. When I unticked easylist 300meg was recovered within 2 minutes. The ram usage is wasteful it seems, but not crippling as I have 16 gig of ram however when the ram usage goes high firefox slows down.
Viper2020

Re: Excessive memory usage

Post by Viper2020 »

Subscriptions are causing a heavy increase to window objects depending on certain sites - though its odd because the sites that are gaining the most are usually less complex than those that gain less....

without EasyList
2,117.48 MB (100.0%) -- explicit
├──1,349.67 MB (63.74%) -- window-objects
│ ├──1,220.13 MB (57.62%) ++ (331 tiny)
│ │ ├─────15.89 MB (00.75%) ++ top(http://www.geforce.com/optimize/guides/ ... ak-guide#1, id=76)/active
│ │ ├─────14.91 MB (00.70%) ++ top(http://www.facebook.com/, id=154)/active
│ │ ├─────11.77 MB (00.56%) ++ top(http://www.gametrailers.com/full-episod ... --part-iii, id=110)/active
│ │ ├──────8.94 MB (00.42%) ++ top(http://www.moetron.com/2012/07/29/fall- ... -schedule/, id=636)/active
│ │ ├──────7.85 MB (00.37%) ++ top(http://www.chia-anime.com/tanken-drilan ... e-4.html/1, id=598)/active

With EasyList
2,786.22 MB (100.0%) -- explicit
├──1,915.70 MB (68.76%) -- window-objects
│ ├──1,807.49 MB (64.87%) ++ (331 tiny)
│ │ ├─────18.08 MB (00.65%) ++ top(http://www.geforce.com/optimize/guides/ ... ak-guide#1, id=76)/active
│ │ ├─────16.98 MB (00.61%) ++ top(http://www.facebook.com/, id=154)/active
│ │ ├─────14.14 MB (00.51%) ++ top(http://www.chia-anime.com/tanken-drilan ... e-4.html/1, id=598)/active
│ │ ├─────12.87 MB (00.46%) ++ top(http://www.moetron.com/2012/07/29/fall- ... -schedule/, id=636)/active
│ │ ├─────12.85 MB (00.46%) ++ top(http://www.gametrailers.com/full-episod ... --part-iii, id=110)/active

with the ChiaAnime site for instance, the memory usage for each tabs increases by roughly 1.8x, while others like firefox might gain a megabyte or so.

I doubt this is a bug in abp, its just the nastiness that is the internet
Luxferre
Posts: 129
Joined: Sun Jan 06, 2013 12:04 pm

Re: Excessive memory usage

Post by Luxferre »

Maybe this helps:

http://www.softpedia.com/get/Tweak/Brow ... izer.shtml or
http://www.softpedia.com/get/Tweak/Memo ... ster.shtml

I am using Datum (Rizone) Memory Booster and it works OK.
There is false positive by Trojan Remover.
multiplire

Re: Excessive memory usage

Post by multiplire »

My figures: 187-188 MB of memory while Adblock Plus is active. Upon disabling it and restarting Firefox, usage fell to 80-90 MB. That's about half. Some people say it's not a big price to pay, but I'm on a ten-year-old laptop with 1 GB of RAM (which is the highest upgrade it can get; it originally had half that). My laptop doesn't process very fast to begin with. With this, Firefox is constantly freezing (as in, an average about at least two freezes per ten minutes). It's been doing this for months and now that I'm working on speeding up my laptop, I figured I might as well look into this as well. I reeeeeally don't want to get rid of Adblock. I looked into using Adblock Lite or Adblock Edge instead, but they're memory monsters as well. Any tips?
Luxferre
Posts: 129
Joined: Sun Jan 06, 2013 12:04 pm

Re: Excessive memory usage

Post by Luxferre »

Try first link in my previous post.Memory usage is down more then
1/3 with PaleMoon And Firefox.
smithmosan
Posts: 4
Joined: Fri Apr 12, 2013 2:12 pm

Re: Excessive memory usage

Post by smithmosan »

Firefox uses 200-400 MB on its own for my browsing habits
Tony Thomas

Re: Excessive memory usage

Post by Tony Thomas »

I recently installed Adblock plus with Firefox and found it very effective. Today, my fan is roaring with the high resource use - I have i7 3rd gen and 12Gb RAM. I will have to uninstall Adblock if this continues.
Post Reply