Opened on 12/20/2016 at 12:59:05 PM

Closed on 12/21/2016 at 04:18:14 PM

Last modified on 03/14/2017 at 02:40:42 PM

#4752 closed defect (fixed)

Options page is extremely slow when dealing with large numbers of custom filters

Reported by: kzar Assignee: kzar
Priority: P3 Milestone: Adblock-Plus-1.13-for-Chrome-Opera
Module: Platform Keywords:
Cc: sebastian, mapx, greiner Blocked By:
Blocking: Platform: Chrome
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

Description (last modified by kzar)


Chrome 55
Adblock Plus 1.12.4

How to reproduce

  1. Download a copy of EasyList.
  2. Open it in a decent text editor, copy the whole thing to the clipboard.
  3. Open the Adblock Plus options page, select the "Add your own filters" tab.
  4. Click "Edit filters as raw text" and paste EasyList into the text area.
  5. Click to save your changes.
  6. Now attempt to "Edit filters as raw text" again, or attempt to remove even a single filter.

Observed behaviour

The options page becomes unresponsive and pegs the CPU, sometimes for a long time. Sometimes Chrome even considers that Adblock Plus has crashed.

Expected behaviour

The options page should use less CPU and be more responsive when dealing with large numbers of custom filters.

Hints for testers

Try pasting 10,000 filters from EasyList into the custom filters box. (Click "Edit filters as raw" and paste them in!) Then play with the custom filters interface and make sure Adblock Plus doesn't crash / take too long to respond. It's expected the interface will run a little slow, but it should still be usable. Things to try:

  • Selecting one / a few filters and clicking the Remove button.
  • Toggling the "Edit filters as raw" box a few times, try making some changes and applying them.
  • Try removing all filters.

Note: Before these changes even attempting to remove a single filter would effectively crash Adblock Plus in this test meaning no web browsing was possible.

Attachments (0)

Change History (8)

comment:1 Changed on 12/20/2016 at 01:03:58 PM by kzar

Obviously it is expected that the interface might slow down when dealing with huge amounts of filters but I still think we can do better here. The interface becomes completely unusable as it stands.

I am not sure what's to blame, initially I suspected thousands of messages would be sent to the background page but apparently not as there's the "filters.importRaw" message. Also when clicking to remove a single filter it takes a huge amount of time until the "filters.remove" message is even sent, which makes me suspect there's something running slowly in the options page itself.

I will investigate when I get a chance.

Last edited on 12/20/2016 at 01:04:53 PM by kzar

comment:2 Changed on 12/20/2016 at 01:12:33 PM by kzar

  • Description modified (diff)

comment:3 Changed on 12/20/2016 at 07:47:07 PM by kzar

  • Owner set to kzar
  • Review URL(s) modified (diff)

comment:4 Changed on 12/20/2016 at 07:49:39 PM by kzar

  • Cc greiner added
  • Status changed from new to reviewing

(Adding Thomas as Cc since this involves the UI.)

It seems a big part of the performance problems was the code dealing with list boxes. Iterating through every filter is slow if there are thousands of filters! With these changes I found the interface much more responsive, there are likely further things we could improve too.

comment:5 Changed on 12/21/2016 at 04:17:09 PM by abpbot

comment:6 Changed on 12/21/2016 at 04:18:14 PM by kzar

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

comment:7 Changed on 12/21/2016 at 04:29:37 PM by kzar

  • Description modified (diff)

comment:8 Changed on 03/14/2017 at 02:40:42 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed in that it's far better compared to 1.12.4. It's still possible to trigger the OS "window not responding" warning but it finishes within 10-20 seconds instead of 60+.

Chrome 49 / 56 / Windows 10
Chrome 56 / OS X 10.12
Chrome 56 / Ubuntu 16.04
Opera 37 / 41 / Windows 7
Safari 10 / OS X 10.12

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from kzar.
Note: See TracTickets for help on using tickets.