Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

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

Aug. 10, 2018, 2:12 p.m. by Manish Jethani
Aug. 15, 2018, 6:58 p.m.
kzar, hub
Base URL:


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


Total messages: 3
Manish Jethani
Aug. 10, 2018, 2:12 p.m. (2018-08-10 14:12:57 UTC) #1
Manish Jethani
Patch Set 1 See description above.
Aug. 10, 2018, 2:19 p.m. (2018-08-10 14:19:28 UTC) #2
Aug. 15, 2018, 5:08 p.m. (2018-08-15 17:08:10 UTC) #3

Powered by Google App Engine
This is Rietveld