Test case: http://forums.mtbr.com/29er-bikes/chinese-carbon-29er-640919.html Make sure 'Display Modes' has 'Hybrid Mode' selected. Profile: http://people.mozilla.com/~bgirard/cleopatra/?report=AMIfv963tUZMHuqJVOWNM2sgKmq-ljpZe1KD2kFbwxEpMHOAeaSdVe3r8eT8uDS4I-vZd1O2vzYl_gm98-YPNmj-EGLk6_nkpuca3shj6sWD3xB35wxzQixC8r6bantt5Ga8oFYC8ATz6a42OGDA37PWXiyrBCzKPQ Now that adblock is blocking loading by over 3 seconds by doing document.write().
14:36 < BenWa> taras: Ok so I spoke to joe & ehsan. The profiles seems to indicate the AdBlock is invoking Document.write which is very inneficient and the dreaded 'synchronous' type of calls 14:37 < BenWa> It apparently stops parsing, processes the document the write, throwing away the parsing up to date and restarts 14:37 < ehsan> to make it more inefficient, you can call document.open before .write ;) 14:37 < BenWa> ok 14:37 < ehsan> and then you can do it in a loop 14:37 < ehsan> and bingo!
Is this Adblock, or Adblock Plus?
Adblock Plus 2.0.3
Wlad, do you have an idea of why ABP is causing (~10x on my machine) slowdown in pageloading?
After looking at this with Diagnostics for Adblock Plus - yes, I do. The "hybrid mode" produces 22000 content policy calls, as opposed to 400 content policy calls in the regular case. That's a whole lot of requests for these addresses: http://forums.mtbr.com/images/misc/paperclip.gif http://forums.mtbr.com/images/misc/tree_t.gif http://forums.mtbr.com/images/statusicon/post_old.gif http://forums.mtbr.com/images/misc/tree_i.gif http://forums.mtbr.com/29er-bikes/clear.gif If you check, these images are really there - in the tree view produced via document.write(). That's a lot of content policy calls to process, despite the caching. According to Diagnostics, Adblock Plus needs on average 0.4ms for each call on my machine, plus XPCOM overhead. I want to look into making our shouldLoad implementation faster but I don't think that it can be magnitudes faster than it currently is.
5 years ago
If we did the loads async (which we want to anyway), we could at least do them form a separate event queue and throttle them or something....
(In reply to Boris Zbarsky (:bz) from comment #7) > If we did the loads async (which we want to anyway), we could at least do > them form a separate event queue and throttle them or something.... Is there a bug/API-proposal for this?
I don't know offhand.
Gathered a new profile with the enhanced JS support: http://people.mozilla.com/~bgirard/cleopatra/?report=9e82fde39f6d6b839df41fa367d26b704f3810d0