Bug 144649 - [Content Extensions] Limit NFA size
Summary: [Content Extensions] Limit NFA size
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-05-05 17:30 PDT by Alex Christensen
Modified: 2015-07-06 10:45 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.58 KB, patch)
2015-05-05 17:37 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (3.32 KB, patch)
2015-05-05 18:05 PDT, Alex Christensen
benjamin: review+
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-05-05 17:30:30 PDT
Right now we’re making an NFA with 249069 nodes.  The NFA uses 100MB of memory.  The DFA uses 241MB of memory.  This is bad.
Limiting the NFA size to 50000 splits this into 7 NFAs.  The largest NFA uses 27MB of memory.  The largest DFA uses 44 MB of memory.  
We could tune the max size later, but we really need a max size.
Comment 1 Alex Christensen 2015-05-05 17:37:27 PDT
Created attachment 252424 [details]
Patch
Comment 2 Alex Christensen 2015-05-05 18:05:53 PDT
Created attachment 252427 [details]
Patch
Comment 3 Benjamin Poulain 2015-05-05 18:11:59 PDT
Comment on attachment 252427 [details]
Patch

lgtm
Comment 4 Alex Christensen 2015-05-05 18:14:27 PDT
http://trac.webkit.org/changeset/183845