Bug 53665

Summary: Make XSSFilter go fast by adding a SuffixTree
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dbates, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 49845    
Attachments:
Description Flags
Patch
none
Patch eric: review+

Adam Barth
Reported 2011-02-03 00:45:40 PST
Make XSSFilter go fast by adding a SuffixTree
Attachments
Patch (3.29 KB, patch)
2011-02-03 00:46 PST, Adam Barth
no flags
Patch (2.99 KB, patch)
2011-02-03 16:11 PST, Adam Barth
eric: review+
Adam Barth
Comment 1 2011-02-03 00:46:46 PST
Eric Seidel (no email)
Comment 2 2011-02-03 00:48:42 PST
Comment on attachment 81038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=81038&action=review > Source/WebCore/html/parser/XSSFilter.cpp:146 > + const size_t miniumLengthForSuffixTree = 512; // FIXME: Tune this parameter. How would we tune it? > Source/WebCore/html/parser/XSSFilter.cpp:183 > + m_decodedHTTPBodySuffixTree = adoptPtr(new SuffixTree<ASCIICodebook>(m_decodedHTTPBody, suffixTreeDepth)); No create?
Adam Barth
Comment 3 2011-02-03 00:54:24 PST
Comment on attachment 81038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=81038&action=review >> Source/WebCore/html/parser/XSSFilter.cpp:146 >> + const size_t miniumLengthForSuffixTree = 512; // FIXME: Tune this parameter. > > How would we tune it? Dunno. With some sort of benchmark. >> Source/WebCore/html/parser/XSSFilter.cpp:183 >> + m_decodedHTTPBodySuffixTree = adoptPtr(new SuffixTree<ASCIICodebook>(m_decodedHTTPBody, suffixTreeDepth)); > > No create? It's adoptPtr, not adoptRef. We could add a create method, but we don't usually.
Adam Barth
Comment 4 2011-02-03 16:11:21 PST
Eric Seidel (no email)
Comment 5 2011-02-03 16:24:26 PST
Comment on attachment 81134 [details] Patch What's the perf improvement?
Adam Barth
Comment 6 2011-02-03 16:26:17 PST
Adam Barth
Comment 7 2011-02-03 16:29:00 PST
We can add these benchmarks to PerformanceTests/XSSFilter if you like.
Eric Seidel (no email)
Comment 8 2011-02-03 16:30:03 PST
(In reply to comment #7) > We can add these benchmarks to PerformanceTests/XSSFilter if you like. I would very much like that. As is, there is too much hidden-knowledge around the filter. Adding the perf tests to a common place makes it easier for others to hack on this (and possibly make it even faster).
Eric Seidel (no email)
Comment 9 2011-02-03 16:31:02 PST
Comment on attachment 81134 [details] Patch OK. I look forward to you landing the perf tests.
Adam Barth
Comment 10 2011-02-03 16:42:13 PST
Adam Barth
Comment 11 2011-02-03 18:41:18 PST
WebKit Review Bot
Comment 12 2011-02-04 02:40:44 PST
http://trac.webkit.org/changeset/77560 might have broken GTK Linux 32-bit Release, GTK Linux 32-bit Debug, and GTK Linux 64-bit Debug The following tests are not passing: fast/events/pagehide-timeout.html
Note You need to log in before you can comment on or make changes to this bug.