Bug 144649

Summary: [Content Extensions] Limit NFA size
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: WebCore Misc.Assignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch benjamin: review+

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