Changeset 62771 in webkit


Ignore:
Timestamp:
Jul 8, 2010 2:01:12 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-07-08 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

WebCore/benchmarks/parser/html-parser.html spends a lot of time in deprecatedParseURL
https://bugs.webkit.org/show_bug.cgi?id=41807

Wow. This was an awful bug. We were always taking the slow case
every time we parsed a URL. This is about a 10% speedup on our
parsing benchmark, and might cause as much as a 1% speedup for Apple's
PLT (even though I can't run that).

We still spend a lot of time in deprecatedParseURL. We might consider
inlining it if its being kept around much longer.

No behavioral change, just fixing a broken optimization.

  • css/CSSHelper.cpp: (WebCore::deprecatedParseURL):
    • We only need to strip characters <= '\r', not >.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r62769 r62771  
     12010-07-08  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        WebCore/benchmarks/parser/html-parser.html spends a lot of time in deprecatedParseURL
     6        https://bugs.webkit.org/show_bug.cgi?id=41807
     7
     8        Wow.  This was an awful bug.  We were always taking the slow case
     9        every time we parsed a URL.  This is about a 10% speedup on our
     10        parsing benchmark, and might cause as much as a 1% speedup for Apple's
     11        PLT (even though I can't run that).
     12
     13        We still spend a lot of time in deprecatedParseURL.  We might consider
     14        inlining it if its being kept around much longer.
     15
     16        No behavioral change, just fixing a broken optimization.
     17
     18        * css/CSSHelper.cpp:
     19        (WebCore::deprecatedParseURL):
     20         - We only need to strip characters <= '\r', not >.
     21
    1222010-07-08  Yury Semikhatsky  <yurys@chromium.org>
    223
  • trunk/WebCore/css/CSSHelper.cpp

    r59281 r62771  
    8080    if (l == length) {
    8181        int k;
     82        // If the URL has any control characters in it, we have to strip them.
     83        // '\r' (ascii value 13) is the largest control character.
    8284        for (k = 0; k < length; k++) {
    83             if (characters[k] > '\r')
     85            if (characters[k] <= '\r')
    8486                break;
    8587        }
Note: See TracChangeset for help on using the changeset viewer.