Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2215 closed defect (fixed)

"Block element" freezes page when highlighting too many elements

Reported by: passbrains Assignee: sebastian
Priority: Unknown Milestone: Adblock-Plus-1.9-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: sebastian, Ross Blocked By:
Blocking: Platform: Opera
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by sebastian)

Adapted from


Windows + Vista 64bit + Opera + English
ABP version opera

How to reproduce

  1. Install latest ABP extension.
  2. Load website
  3. Click on ABP icon and select "Block Element".
  4. Select second row to block as shown in snapshot.
  5. Observe 1
  6. Try to move  mouse cursor anywhere.
  7. Observe 2.

Observed behaviour

Observe 1 : Add filter dialog does not cpme up.
Observe 2  No response on screen on moving mouse cursor.
Check 3 times, same behavior observed.

Expected behaviour

Add filter dialog should come up immediately. The page shouldn't freeze.

Attachments (1)

3668_1426871680_file.jpg (132.2 KB) - added by passbrains 5 years ago.

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by passbrains

comment:1 Changed 5 years ago by passbrains

1 - 25 Mar 2015 13:53:17 posted by Ross Green

It appears to hang for a "long" time (5+ seconds) after selecting one of the list entries. The Add filter dialog is eventually displayed with either "" or "" as the filter.

Opera 28 / Windows Vista x64 / ABP Build:

comment:2 Changed 5 years ago by sebastian

  • Cc sebastian Ross added
  • Description modified (diff)

That is because the high number of other elements with the same class which will be highlighted as well when that element is selected.

Instead of highlighting all elements at once, I could highlight them progressively. This would prevent the tab from freezing and the dialog would show up immediately, while the remaining elements will get highlighted in the background with a delay.

Though I'm not sure whether that it worth it. This seems like a corner case to me.

comment:3 Changed 5 years ago by sebastian

Also see #2210.

comment:4 Changed 5 years ago by sebastian

  • Component changed from Unknown to Platform

comment:5 Changed 5 years ago by sebastian

  • Description modified (diff)
  • Owner set to sebastian
  • Ready set
  • Summary changed from Selecting element for blocking cuase non response/hang of webpage to "Block element" freezes page when highlighting too many elements

comment:6 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:7 Changed 5 years ago by sebastian

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

comment:8 Changed 5 years ago by sebastian

The elements are now highlighted progressively, giving other code a chance to run in between highlighting the individual elements. This will still result in high CPU-load when a huge number of elements is highlighted. But the dialog should show up immediately and the page shouldn't freeze anymore.

@Ross: Can you confirm that this change fixes this issue as well as #2210?

comment:9 Changed 5 years ago by Ross

Fixed and feels much more responsive (comparing to Opera which currently doesn't have this fix). Dialog appears quickly and I couldn't reproduce the page freezing at all.

Chrome 41.0.2272.118 / Windows 8.1 x64 / ABP:

Note: See TracTickets for help on using tickets.