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

Issue 29791555: Issue 6727 - Use string rather than map for single-domain filters (Closed)

Created:
May 26, 2018, 10:52 a.m. by Manish Jethani
Modified:
June 26, 2018, 9:25 a.m.
Reviewers:
sergei, kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

This reduces the memory footprint of ElemHideBase subclasses by ~2 MB. Before this change it's ~12.5 MB on my machine, after the change it's ~10.5 MB. We avoid creating unnecessary maps for single-domain cases. Out of ~30,000 element hiding and emulation filters and exceptions in EasyList+AA, ~12,000 are single-domain cases.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Patch Set 3 : Fix ESLint error #

Patch Set 4 : Use temporary Map objects #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -4 lines) Patch
M lib/filterClasses.js View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 11
Manish Jethani
May 26, 2018, 10:52 a.m. (2018-05-26 10:52:09 UTC) #1
Manish Jethani
Patch Set 1
May 26, 2018, 10:55 a.m. (2018-05-26 10:55:47 UTC) #2
sergei
A good catch! I think it deserves an issue, would you mind to create one? ...
May 28, 2018, 9:22 a.m. (2018-05-28 09:22:07 UTC) #3
Manish Jethani
On 2018/05/28 09:22:07, sergei wrote: > A good catch! I think it deserves an issue, ...
June 4, 2018, 6:07 p.m. (2018-06-04 18:07:43 UTC) #4
kzar
Once again sorry for my slow response. I think if we can save something like ...
June 5, 2018, 4:51 p.m. (2018-06-05 16:51:30 UTC) #5
Manish Jethani
https://codereview.adblockplus.org/29791555/diff/29791556/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/29791555/diff/29791556/lib/filterClasses.js#newcode537 lib/filterClasses.js:537: typeof this.domains != "string" && this.domains.get("")) On 2018/06/05 16:51:30, ...
June 6, 2018, 11:16 a.m. (2018-06-06 11:16:31 UTC) #6
kzar
On 2018/06/06 11:16:31, Manish Jethani wrote: > I personally do prefer to group things logically ...
June 6, 2018, 11:54 a.m. (2018-06-06 11:54:53 UTC) #7
Manish Jethani
Patch Set 2: Rebase Patch Set 3: Fix ESLint error Patch Set 4: Use temporary ...
June 6, 2018, 12:28 p.m. (2018-06-06 12:28:06 UTC) #8
Manish Jethani
https://codereview.adblockplus.org/29791555/diff/29791556/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/29791555/diff/29791556/lib/filterClasses.js#newcode537 lib/filterClasses.js:537: typeof this.domains != "string" && this.domains.get("")) On 2018/05/28 09:22:07, ...
June 6, 2018, 12:31 p.m. (2018-06-06 12:31:19 UTC) #9
Manish Jethani
Patch Set 4 is a simplified version of this that keeps the changes in one ...
June 25, 2018, 12:48 p.m. (2018-06-25 12:48:33 UTC) #10
sergei
June 26, 2018, 9:16 a.m. (2018-06-26 09:16:19 UTC) #11
LGTM

Powered by Google App Engine
This is Rietveld