Opened 21 months ago

Last modified 20 months ago

#7210 closed change

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

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):



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.

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 (0)

Note: See TracTickets for help on using tickets.