Changes between Version 2 and Version 3 of Ticket #7045


Ignore:
Timestamp:
10/15/2018 05:07:31 AM (14 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7045 – Description

    v2 v3  
    1111In order for this to work on V8, we would have to override some of V8's own string optimizations that are sometimes harmful (V8 issue [https://bugs.chromium.org/p/v8/issues/detail?id=2869 #2869]). When we "slice" out a part of a string, we must properly separate it from its V8 internal parent string, using an operation like `JSON.parse(JSON.stringify(string))`. Once we are able to do this, we can restructure such long filter texts with a more efficient layout in memory. 
    1212 
    13 I have written a [https://codereview.adblockplus.org/29909576/ patch] that performs this optimization on content filters (element hiding, element hiding emulation, and snippet filters and exceptions) where the domains part of the text is 1,000 characters or longer. It reduces the initial heap used by ~1.9 MB, from ~39.6 MB to ~37.7 MB. More pertinently, it reduces the memory occupied by all strings from ~16 MB down to ~14 MB. 
     13I have written a [https://codereview.adblockplus.org/29909576/ patch] that performs this optimization on filters where the domains part of the text is 1,000 characters or longer. It reduces the initial heap used by ~3.8 MB, from ~39.6 MB to ~35.8 MB. More pertinently, it reduces the memory occupied by all strings from ~16 MB down to ~12 MB. 
    1414 
    1515=== What to change ===