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

Issue 29799602: Noissue - Avoid setting BlockingFilter instance properties (Closed)

Created:
June 5, 2018, 2:13 p.m. by Manish Jethani
Modified:
June 6, 2018, 11:11 a.m.
Reviewers:
sergei, kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

This saves ~800 KB on the heap.

Patch Set 1 #

Patch Set 2 : Avoid setting csp and rewrite properties as well #

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

Messages

Total messages: 6
Manish Jethani
June 5, 2018, 2:13 p.m. (2018-06-05 14:13:52 UTC) #1
Manish Jethani
Patch Set 1 We do this in the superclass RegExpFilter for the thirdParty and sitekeys ...
June 5, 2018, 2:16 p.m. (2018-06-05 14:16:01 UTC) #2
Manish Jethani
Patch Set 2: Avoid setting csp and rewrite properties as well Now it saves ~900 ...
June 5, 2018, 2:23 p.m. (2018-06-05 14:23:17 UTC) #3
sergei
On 2018/06/05 14:23:17, Manish Jethani wrote: > Patch Set 2: Avoid setting csp and rewrite ...
June 5, 2018, 2:41 p.m. (2018-06-05 14:41:08 UTC) #4
kzar
Wow, LGTM.
June 5, 2018, 5:21 p.m. (2018-06-05 17:21:10 UTC) #5
Manish Jethani
June 6, 2018, 11:09 a.m. (2018-06-06 11:09:41 UTC) #6
On 2018/06/05 14:41:08, sergei wrote:
> On 2018/06/05 14:23:17, Manish Jethani wrote:
> > Patch Set 2: Avoid setting csp and rewrite properties as well
> > 
> > Now it saves ~900 KB for some reason. There's no need to set these
properties
> > either.
> 
> Is it easy to compare the dumps of JS heaps somehow in order to see what makes
> the difference? I would assume that it's because now the memory is not wasted
> for the fields which are rarely used and the memory is indeed saved by sharing
> the same "base-hidden" class.

I haven't checked, but it makes sense that the memory usage would go down
because of fewer properties [1]

[1]: https://v8project.blogspot.com/2017/08/fast-properties.html

Powered by Google App Engine
This is Rietveld