Opened 3 years ago

Last modified 7 weeks ago

#4060 closed defect

Adblock Plus for Chrome adds 50ms to DOMContentLoaded — at Version 8

Reported by: skillbill Assignee:
Priority: Unknown Milestone:
Module: Platform Keywords: closed-in-favor-of-gitlab
Cc: sebastian, kzar, mapx Blocked By:
Blocking: Platform: Chrome
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)

How to reproduce

  1. Create a file index.html with the following contents:
<html>
  <head>
    <title>Test</title>
  </head>
  <body><h1>Test</h1></body>
</html>
  1. Launch a webserver python -m SimpleHttpServer
  2. Browse to http://localhost:8000/
  3. Open the dev tools, on the Network tab
  4. Refresh the page

Observed behaviour

A delay of around 50ms between localhost returning the document and DOMContentLoaded.

Expected behaviour

No such delay, as when Adblock Plus is uninstalled.

Notes

The delay seems to be the same when Adblock Plus has EasyList enabled as when it has no filters or subscriptions. The delay also seems the same before the changes we made for #235. The delay is present quite far back in the code (tested back to Adblock Plus 1.9), it does not seem to be a recent regression.

Change History (8)

comment:1 Changed 3 years ago by mapx

  • Cc sebastian kzar trev added

comment:2 Changed 3 years ago by mapx

  • Cc mapx added

comment:3 Changed 3 years ago by kzar

I just tried to reproduce this, hosting the following page using python -m SimpleHttpServer:

<html>
  <head>
    <title>Test</title>
  </head>
  <body><h1>Test</h1></body>
</html>

My results:

Around 10ms with no extensions
Around 60ms with EasyList before #235 changes
Around 60ms with EasyList after #235 changes
Around 60ms with no filters/subscriptions after #235 changes

FWIW I had something like 150ms with all the extensions I normally have enabled.

According to the Chrome dev tools Network tab the response returning index.html took 4ms and then DOMContentLoaded was at 57ms, with nothing showing in between.

I was using Chrome Version 50.0.2661.94 (64-bit) on Debian Stretch.

comment:4 Changed 3 years ago by kzar

  • Component changed from Unknown to Platform
  • Description modified (diff)
  • Summary changed from 100ms + to dom content loaded to Adblock Plus for Chrome adds 50ms to DOMContentLoaded

comment:5 Changed 3 years ago by kzar

  • Description modified (diff)

comment:7 Changed 3 years ago by kzar

No, does not seem to be caused by #3699. I get pretty much the same delay before that change and indeed way before then. I tested up to 1.9, does not seem to be a recent regression.

Not to say that it's impossible to improve, perhaps there is a way. I think Sebastian is more likely to have some ideas there though.

comment:8 Changed 3 years ago by kzar

  • Description modified (diff)
Note: See TracTickets for help on using tickets.