Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#7210 closed change (fixed)

Skip redundant round-trips to the background page when collapsing elements targeted by the same selector

Reported by: sebastian Assignee: sebastian
Priority: P2 Milestone: Adblock-Plus-3.4.3-for-Chrome-Opera-Firefox
Module: Platform Keywords:
Cc: mjethani, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://gitlab.com/eyeo/adblockplus/adblockpluschrome/merge_requests/26

Description (last modified by sebastian)

Background

In include.preload.js, we already keep track of selectors used for element collapsing, in order to avoid injecting the same selector twice. However, we still send a message to the background page for every failed attempt to load an element regardless whether we have seen the resulting selector before. Instead, we could keep tack of all seen selectors (which most of the time will be the same number of selectors we inject), and skip the messaging with the background page altogether for selectors we have seen before.

That way we also avoid Firefox to run out of memory if a page attempts to reload a resource that failed to load (or was blocked) at a high frequency, see Firefox bug 1516508.

What to change

Keep track of all selectors considered for element collapsing, and don't send more than one filters.collapse message for elements that are targeted by an incidental selector.

Change History (7)

comment:1 Changed 6 months ago by sebastian

  • Description modified (diff)

comment:2 Changed 6 months ago by sebastian

  • Priority changed from Unknown to P2
  • Ready set
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 6 months ago by abpbot

comment:4 Changed 6 months ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:5 Changed 6 months ago by sebastian

  • Milestone changed from Adblock-Plus-for-Chrome-Opera-Firefox-next to Adblock-Plus-3.4.3-for-Chrome-Opera-Firefox

comment:6 Changed 6 months ago by abpbot

comment:7 Changed 6 months ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed. Reproduced issue with current release, issue is fixed in development build.

ABP 3.4.2.2231
Firefox 64.0.2 / Windows 10 (Latest)
Firefox 51.0 / Windows 10 (Min supported)

Note: See TracTickets for help on using tickets.