Adblock Plus and (a little) more

Asynchronous file operations, end of support for old browsers · 2012-04-05 16:28 by Wladimir Palant

Starting with Adblock Plus 2.0.4b.3443 reading and saving of patterns.ini and elemhide.css files will be asynchronous (meaning that they won’t delay other operations that Firefox or Adblock Plus might need to do). This approach has a bunch of advantages:

  • Firefox startup and shutdown will be faster.
  • Adblock Plus Preferences will be more responsive, changing something will no longer cause the browser to hang for a split second.
  • The inherently unreliable cache.js file is no longer necessary and will not be used.

There are also some drawbacks which is why it took so long to make this decision:

  • First browser window might appear before Adblock Plus managed to read its filters. If that happens, the web pages from the restored session (or the homepage) might have ads. This never happened in my testing but it is possible.
  • patterns.ini is no longer saved on browser shutdown, some hit count information might get lost because of that (up to 250 hits).

Known issues (should be fixed soon):

  • When updating from an earlier Adblock Plus version, the first-run page might open. Your settings will not be changed.
  • Writing elemhide.css might fail in some rare scenarios.

In other news, support for anything before Firefox 8, Thunderbird 8 and SeaMonkey 2.5 has been dropped. I started cleaning up our code using the new platform capabilities and will continue doing so. Also, a work-around for the subscription download issue in Firefox 14 has been implemented.

To the install page

Tags:

Comment [4]

  1. Marijo · 2012-04-05 18:43 · #

    Startup is noticeably slower with the beta (Fx12b4, Win7 32-bit). Performance-wise it’s pretty much the opposite of when cache.js was introduced.

    Reply from Wladimir Palant:

    That should be because of filter matching data structures being initialized on startup again – previously they were cached. I’ll look into what can be done there.

    Reply from Wladimir Palant:

    I think the only real solution will be delaying Adblock Plus initialization until Firefox starts up (we already do that on Firefox Mobile). This will make sure that we really don’t cause any startup delays. The disadvantage will be of course ads in restored tabs.

  2. Marijo · 2012-04-06 13:40 · #

    I probably should’ve mentioned it in my first post but I’m running Fx+ABP on an almost 7-year old CPU (Athlon 2.4GHz dual-core). Is this startup delay even noticeable on today’s quad-core CPUs? If it is not, then optimizing would be a waste of time unless you share startup code with the mobile version and want to kill two birds with one stone.

    Reply from Wladimir Palant:

    I don’t have a quad core CPU so I can’t tell :)

    I didn’t do proper measuments yet, I can merely see that initializing data structures takes 750ms now instead of ~430ms for loading cache.js in old builds. But that’s a full initialization, loading patterns.ini while the session is restored is no longer necessary. Still, there might be some more delay that I simply didn’t measure yet. If that turns out significant, moving Adblock Plus initialization should be the right thing to do.

  3. Michel · 2012-04-18 05:39 · #

    Here’s I have old quad CPU and One Newer CPU 2 years old…

    On my old machine I run 2.0.4b.3443 and on the new machine it is the current release.

    So I can tell you there is no difference at all in loading speed on Firefox 12b under Win7.

    Moreover delaying Adblock Plus initialization will cause me everyday (in the real world) to have to reload my 25 and more tabs I use everyday..

    So if you put a delay Vlad put an option to remove the delay or use it. It’s a lot more pain and time to have to refresh all windows than wait fews seconds (Even if here there is no difference at all)

    Best Regards

    Michel
    Quebec Canada

    Reply from Wladimir Palant:

    Don’t worry, current Firefox versions won’t load 25 tabs on startup. I think that only the selected tab actually loads, the other ones load when you switch to them.

  4. Michel · 2012-04-18 14:19 · #

    Hi Vlad,

    It’s an option in Firefox (since Version 8) to load all tabs on Start-up or just the load tabs on demand…

    Look Here: http://imm.io/msLW

    Since I use lot of “real time” apps in my Firefox I need that ALL tabs load on start-up, even if it take 2 more seconds ;-)

    And with AB it’s work fine cause all advertisements, spams, or usefulness things are not loaded in my tabs ;-) So even with over 20 tabs it’s very fast… ( And my Internet is not the faster (5mb/s) on the market)

    Regards
    Michel
    Quebec Canada

Commenting is closed for this article.