Changes between Version 1 and Version 2 of Ticket #4060, comment 9


Ignore:
Timestamp:
05/23/2016 10:06:16 AM (3 years ago)
Author:
sebastian
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4060, comment 9

    v1 v2  
    11I can confirm that Adblock Plus is adding some overhead to page load, even with no active filters or even when commenting out the element hiding code. However, this behavior isn't specific to Adblock Plus but all extensions that use content scripts seem to cause a delay. For reference I get ~15ms with no extension, ~100ms with Adblock Plus and ~60ms with uBlock. 
    22 
    3 The reason why Adblock Plus is causing more delay than other extensions might be that we have 3 content scripts that run at `document_start`. And there is certainly some overhead per script regardless of the code that the script runs. For reference, when I remove any code from all of our content scripts it still takes ~35ms to load the page. So perhaps we can reduce the overhead by bundling all 3 content scripts into a single file. 
     3However, the reason why Adblock Plus is causing more delay than other extensions might be that we have 3 content scripts that run at `document_start`. And there is certainly some overhead per script regardless of the code that the script runs. For reference, when I remove any code from all of our content scripts it still takes ~35ms to load the page. So perhaps we can reduce the overhead by bundling all 3 content scripts into a single file. 
    44 
    55Besides that, we can also try moving `include.postload.js` from `document_end` to `document_idle`. Theoretically, this shouldn't have any effect on `DOMContentLoaded`, but in my tests the code in that script was repsonsible for ~10ms of the delay. And having that code run a little later if the browser is busy shouldn't hurt.