Opened on 04/11/2014 at 03:39:21 PM

Closed on 02/04/2015 at 01:07:41 PM

Last modified on 02/06/2015 at 12:51:11 PM

#303 closed change (fixed)

Don't load element hiding rules

Reported by: fhd Assignee:
Priority: P2 Milestone: Adblock-Plus-for-Android-1.3
Module: Adblock-Plus-for-Android Keywords:
Cc:, arthur, trev Blocked By:
Blocking: #1541 Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by fhd)


Element hiding is currently disabled, mainly to save memory. However, ever since we moved to libadblockplus, element hiding rules are being kept in memory again.

What to change

Don't load any element hiding filters.

Once element hiding is properly disabled, we can create an issue for enabling it again. But before we can do that, we need to make sure that the elemhide filter option works, that we don't cause blank pages in Chrome, and ideally we should have reduced memory usage significantly with #145.

Attachments (0)

Change History (18)

comment:1 Changed on 04/11/2014 at 03:42:46 PM by fhd

  • Description modified (diff)

comment:2 Changed on 04/11/2014 at 03:45:07 PM by fhd

  • Description modified (diff)

comment:3 Changed on 04/11/2014 at 05:34:43 PM by mapx

  • Cc added

comment:4 Changed on 05/07/2014 at 03:12:57 PM by jobp

  • Cc added

comment:5 Changed on 05/07/2014 at 03:43:54 PM by arthur

  • Cc arthur added

comment:6 Changed on 09/30/2014 at 03:35:55 PM by fhd

  • Platform set to Unknown

For reference: Here's how we kept elemhide rules from loading prior to the libadblockplus integration:

Since we can't directly modify the Core code anymore (nor should we!), we either need to add this as a feature to libadblockplus, or find an Android-specific workaround for the time being. Wouldn't really mind the latter.

comment:7 Changed on 09/30/2014 at 04:19:02 PM by mapx

  • Cc removed

comment:8 Changed on 10/01/2014 at 03:00:47 PM by rjeschke

  • Review URL(s) modified (diff)

comment:9 Changed on 10/01/2014 at 07:12:13 PM by fhd

  • Blocked By 1460 added

comment:10 Changed on 10/01/2014 at 07:14:13 PM by fhd

As discussed in the review, adding this as a libadblockplus feature is pretty easy and doesn't require a Core change. In that case it seems like the best route.

comment:11 Changed on 11/06/2014 at 01:13:57 PM by rjeschke

I would still implement the hack first and create a follow up issue for removing the hack. The reason why I would like to go this way is the following:

If we do not want to change the core we have to remove the filters after they have been loaded. This does only create a small benefit, as we could reduce long-time memory usage. However, peak memory usage is still high (this could lead to a OOM with instant kill) and because of v8's GC behaviour it is not guaranteed when the memory will be freed.

The IMHO correct way to implement this is to make a change to the core to prevent loading of elemhide filters in the first place instead of removing them afterwards. This change, however, will result in some more changes concerning e.g. properties and also in testing issues.

comment:12 Changed on 11/06/2014 at 01:31:53 PM by fhd

  • Cc newshades trev added; arthur removed

Your call at the end of the day. Frankly, I don't particularly like either hack and was hoping to sit this out until we have typed objects, and the saved memory is negligible :)

If we're going to mess with the response text, we should ensure as good as possible that the response actually contains a filter list.

comment:13 Changed on 11/06/2014 at 01:33:12 PM by fhd

  • Cc arthur added; newshades removed

Restored the CC list (was only planning to add Wladimir, no idea what happened).

comment:14 Changed on 11/06/2014 at 01:38:23 PM by rjeschke

  • Review URL(s) modified (diff)

comment:15 Changed on 11/06/2014 at 01:40:00 PM by rjeschke

  • Blocking 1541 added

comment:16 Changed on 11/06/2014 at 01:53:28 PM by rjeschke

  • Blocked By 1460 removed

comment:17 Changed on 02/04/2015 at 01:07:41 PM by rjeschke

  • Resolution set to fixed
  • Status changed from new to closed

comment:18 Changed on 02/06/2015 at 12:51:11 PM by rjeschke

  • Milestone set to Adblock-Plus-for-Android-1.3

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 (none).
Note: See TracTickets for help on using tickets.