Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(400)

Issue 29852555: Issue 6559 - Convert subscriptions property of Filter to a set (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 4 months ago by Manish Jethani
Modified:
1 year, 3 months ago
Reviewers:
hub, kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

This further reduces the initial heap size by ~2 MB. The reason this happens is that there are duplicate entries for some Subscription objects in some Filter objects. For example, this filter: ##.adblock_floating_message It occurs twice in the Adblock Warning Removal List, hence there are two entries in its subscriptions array for the same Subscription object. By using a Set we eliminate the duplicates. In a number of places we also don't have to check if the Subscription object already exists in the list before performing an operation like add or delete. I'm also seeing a very slight speed-up in the parsing/loading of the initial subscriptions.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -33 lines) Patch
M lib/filterClasses.js View 1 chunk +2 lines, -2 lines 0 comments Download
M lib/filterListener.js View 2 chunks +3 lines, -5 lines 0 comments Download
M lib/filterStorage.js View 5 chunks +13 lines, -20 lines 0 comments Download
M test/filterListener.js View 1 chunk +5 lines, -5 lines 0 comments Download
M test/filterStorage.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
Manish Jethani
1 year, 4 months ago (2018-08-10 14:12:57 UTC) #1
Manish Jethani
Patch Set 1 See description above.
1 year, 4 months ago (2018-08-10 14:19:28 UTC) #2
hub
1 year, 3 months ago (2018-08-15 17:08:10 UTC) #3
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 87257f5