You might have heard of the Adblock extension that has a massive list of URL filters to block out adverts from most websites. Does this slow down Firefox, considering that for every little image and flash it has to consult that massive URL whitelist?

  • 2
    Images take longer to download than does a lookup... – Ed S. Oct 30 '09 at 7:38

Most of the blocked content is made up of flash files, images and scripts. These are quite large and require time to download.

So, by blocking them Adblock actually improves the loading time, sometimes by a lot.


Yes, it does slow Fx down. It's a fact. For sure, you save the bandwith of non loaded graphics, banners etc. The negative aspect is, that ABP needs to check every URL (yes, resource locator) if it's on one blocking rule.

I recently installed one big big filterlist and it really slowed Fx down.

But: If you only use a small filter subscription, you can be sure there's no effect you'll notice.

  • Do you have a reference for this? – alfplayer Nov 2 '09 at 3:32
  • It's logical. If every ressource that has to be loaded must be checked if blocked, it consumes time. I don't have statistics on this, but try for yourself. Firebug will help you to measure. – guerda Nov 2 '09 at 7:57
  • I also think it's logical, and it's probably what happens. But implementations vary. – alfplayer Nov 2 '09 at 23:22
  • 3
    On a page with no adverts at all, it'll be slowed down. But seriously, we live in 2009, checking 100 URLs against a filter of 1000 blocks shouldn't take more than a second, especially if it's done intelligently. On a website full of ads it'll be speeded up, but more importantly, there will be no ads on the page. This is worth potential speed losses to me. – Phoshi Nov 2 '09 at 23:31
  • 1
    Phoshi: Of course it's a big advantage if there're no ads anymore. You save rendering time and bandwith so it will increase speed. But the more complex your filter rules and the page structure (with lots of different urls to different servers), the more ABP will slow down the page. – guerda Nov 3 '09 at 7:42

It doesn't seem to slow Firefox down. If anything the impression I get is that sites load faster as they don't have to fetch so much data.

You could do some timings with Adblock turned on and off, but there are so many variables (caches, network latency etc.) that the numbers you get wouldn't be particularly useful.


Time for matching against a large list of items is generally not proportional to the size of the list (technical term is O(n)). If it were, each Google query would take many years.

As others pointed out, the time saved by not fetching and displaying the blocked elements probably far exceeds time spend matching against the list.

  • 4
    Can the performance matching URLs of this addon be really compared to that of Google's search infrastructure? – alfplayer Nov 2 '09 at 3:29
  • Assuming they're using similar algorithms, yes. They won't be, it'll just be a linear search, the quantities aren't worth implementing anything more complex/ – Phoshi Nov 2 '09 at 23:29
  • 1
    Didn't mean to compare matching URLs to Google, just to point out matching is not necessarily slow (misconception I see in the question). Of course, there is a variety of algorithms and variations of the problem (exact match, wildcards, regex etc.). Not sure exactly what Adblock does -- it must a bit more than a linear search since they do support wildcards. – dbkk101 Nov 4 '09 at 16:09
  • 1
    Adblock tries to extract a static substring out of the filter, which is then tested before wildcards. (For example, it will skip */banners/* if the URL doesn't contain /banners or something similar.) – grawity Jun 2 '11 at 11:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.