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

Issue 29909576: [experiment] Issue 7045 - Optimize V8 memory layout of filter text

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

Description

This patch reduces the initial memory footprint by ~3.8 MB on V8 by optimizing the memory layout of filter text containing very long (1,000+ characters) domains. To test this patch: 1. Do a fresh install of ABP built from source, let the first-run page open up, open Task Manager in Chrome and close all tabs 2. Rebuild from source, wait for the extension to load, wait a few seconds for GC to kick in, and observe the "live" JavaScript memory in Task Manager 3. Apply the patch and repeat step 2 In step 2, the memory used (heap) should be ~40,500 KB. In step 3, it should be down to ~36,500 KB.

Patch Set 1 : #

Patch Set 2 : Remove check in lib/filterClasses.js #

Patch Set 3 : Make domains parameter nullable and optional #

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

Messages

Total messages: 6
Manish Jethani
9 months, 1 week ago (2018-10-14 04:38:28 UTC) #1
Manish Jethani
Patch Sets 1-3 This patch is black magic, but if you apply it you'll find ...
9 months, 1 week ago (2018-10-15 21:52:49 UTC) #2
hub
My concern here is this change that is across platforms is made with v8 internals ...
9 months, 1 week ago (2018-10-16 15:30:19 UTC) #3
Manish Jethani
On 2018/10/16 15:30:19, hub wrote: > My concern here is this change that is across ...
9 months ago (2018-10-16 20:02:07 UTC) #4
Manish Jethani
On 2018/10/16 20:02:07, Manish Jethani wrote: > Peak memory too is higher at ~97 MB ...
9 months ago (2018-10-16 20:09:28 UTC) #5
Manish Jethani
9 months ago (2018-10-21 13:22:45 UTC) #6
There is another way to do this that might be cleaner and have benefits on
Firefox as well, let me try it out.
Sign in to reply to this message.

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