Bug 36694 - Make XSSAuditor go fast with large POST data
Summary: Make XSSAuditor go fast with large POST data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://webblaze.org/abarth/tests/slow...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-27 00:24 PDT by Adam Barth
Modified: 2010-04-02 02:01 PDT (History)
4 users (show)

See Also:


Attachments
Patch (12.51 KB, patch)
2010-03-27 00:37 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (12.50 KB, patch)
2010-03-27 01:04 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (15.98 KB, patch)
2010-04-02 00:36 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-03-27 00:24:48 PDT
This bug is a followup to https://bugs.webkit.org/show_bug.cgi?id=35373.  In that bug, we got within a factor of four of the auditor-disabled speed.  In this bug, we're going do a lot better in this benchmark.

I've hosted the benchmark here for convenience:
http://webblaze.org/abarth/tests/slow-filter/webkit-test-5.php
Comment 1 Adam Barth 2010-03-27 00:25:46 PDT
I hate git.  I just deleted all my work.  :(
Comment 2 Adam Barth 2010-03-27 00:28:27 PDT
TextMate, however, is awesome and recovered all my code.
Comment 3 Adam Barth 2010-03-27 00:37:43 PDT
Created attachment 51817 [details]
Patch
Comment 4 WebKit Review Bot 2010-03-27 00:39:43 PDT
Attachment 51817 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/page/XSSAuditor.h:37:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Adam Barth 2010-03-27 00:43:57 PDT
Comment on attachment 51817 [details]
Patch

Will fix some nits.
Comment 6 Adam Barth 2010-03-27 01:04:56 PDT
Created attachment 51818 [details]
Patch
Comment 7 Adam Barth 2010-03-27 01:07:52 PDT
Here are some run times for that benchmark:

XSSAuditor enabled:
1562
1531
1652

XSSAuditor disabled:
1525
1538
1571

I ran it a bunch more times, and anecdotally the benchmark seemed to have higher variance than these number.  However, I didn't keep records, so it's hard to draw conclusions.

In any case, the overhead is much smaller (even in this pathological case) using the suffix tree.
Comment 8 WebKit Review Bot 2010-03-27 01:10:21 PDT
Attachment 51818 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/page/XSSAuditor.h:37:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Daniel Bates 2010-04-01 22:32:57 PDT
Comment on attachment 51818 [details]
Patch

I would suggest adding SuffixTree to the Xcode project code for consistency with the changes to the other projects files even though the Mac EWS does not report any issues.

Looks good to me.

r=me
Comment 10 Adam Barth 2010-04-02 00:36:45 PDT
Created attachment 52398 [details]
Patch for landing
Comment 11 WebKit Commit Bot 2010-04-02 02:00:59 PDT
Comment on attachment 52398 [details]
Patch for landing

Clearing flags on attachment: 52398

Committed r56991: <http://trac.webkit.org/changeset/56991>
Comment 12 WebKit Commit Bot 2010-04-02 02:01:04 PDT
All reviewed patches have been landed.  Closing bug.