Bug 144290 - [Content Extensions] Use less memory for CombinedURLFilters
Summary: [Content Extensions] Use less memory for CombinedURLFilters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-27 16:06 PDT by Alex Christensen
Modified: 2015-04-28 12:41 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.95 KB, patch)
2015-04-27 16:07 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (10.24 KB, patch)
2015-04-27 16:25 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (10.36 KB, patch)
2015-04-27 16:41 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (40.16 KB, patch)
2015-04-28 11:40 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2015-04-27 16:06:04 PDT
The prefix tree uses too much memory.  Let's make it use less memory by using Vectors instead of HashTables, assuming the Vectors stay small because we still need to search through them.
Comment 1 Alex Christensen 2015-04-27 16:07:05 PDT
Created attachment 251783 [details]
Patch
Comment 2 Alex Christensen 2015-04-27 16:25:08 PDT
Created attachment 251784 [details]
Patch
Comment 3 Alex Christensen 2015-04-27 16:41:51 PDT
Created attachment 251785 [details]
Patch
Comment 4 Alex Christensen 2015-04-27 16:46:44 PDT
This actually increases the memory usage.  Strange...
Comment 5 Alex Christensen 2015-04-28 11:40:34 PDT
Created attachment 251871 [details]
Patch
Comment 6 Andreas Kling 2015-04-28 11:49:53 PDT
Comment on attachment 251871 [details]
Patch

This seems pretty sensible. r=me

I'm pretty sure we could drop the default 16 down to 8 or 4 too, but that would require a bit of testing.
Comment 7 Alex Christensen 2015-04-28 12:22:16 PDT
By the way, this reduces the memory usage of combinedURLFilters in ContentExtensionCompiler.cpp by a factor of 3.
Comment 8 WebKit Commit Bot 2015-04-28 12:41:33 PDT
Comment on attachment 251871 [details]
Patch

Clearing flags on attachment: 251871

Committed r183499: <http://trac.webkit.org/changeset/183499>
Comment 9 WebKit Commit Bot 2015-04-28 12:41:36 PDT
All reviewed patches have been landed.  Closing bug.