Changeset 208815 in webkit


Ignore:
Timestamp:
Nov 16, 2016 2:53:48 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
https://bugs.webkit.org/show_bug.cgi?id=163307

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-16
Reviewed by Alexey Proskuryakov.

Source/WebCore:

  • platform/URLParser.cpp:

Removed some unnecessary and redundant assertions in iterators, which are inside inner loops.
(WebCore::URLParser::parsedDataView):
(WebCore::URLParser::parse):
Add a parsedDataView that just returns a UChar instead of a StringView for 1-length views.
This speeds up debug builds considerably, which spent most of the time parsing the path
making and destroying these 1-length StringViews. It can't hurt release builds.

  • platform/URLParser.h:

LayoutTests:

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r208814 r208815  
     12016-11-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=163307
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * platform/ios-simulator/TestExpectations:
     9        * platform/mac/TestExpectations:
     10
    1112016-11-16  Alex Christensen  <achristensen@webkit.org>
    212
  • trunk/LayoutTests/platform/ios-simulator/TestExpectations

    r208814 r208815  
    27272727webkit.org/b/163291 media/video-play-require-user-gesture.html
    27282728
    2729 webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size-iframe.html [ Skip ]
    2730 webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size.html [ Skip ]
    2731 webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size-iframe.html [ Skip ]
    2732 webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size.html [ Skip ]
    2733 
    27342729webkit.org/b/163755 imported/w3c/csswg-test/css-shapes-1 [ Skip ]
    27352730
  • trunk/LayoutTests/platform/mac/TestExpectations

    r208792 r208815  
    14431443webkit.org/b/116621 fast/replaced/preferred-widths.html [ Pass Failure ]
    14441444
    1445 webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size-iframe.html [ Skip ]
    1446 webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size.html [ Skip ]
    1447 webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size-iframe.html [ Skip ]
    1448 webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size.html [ Skip ]
    1449 
    14501445webkit.org/b/164088 [ Yosemite ] media/modern-media-controls/scrubber-support/scrubber-support-click.html [ Skip ]
    14511446webkit.org/b/164088 [ Yosemite ] media/modern-media-controls/scrubber-support/scrubber-support-drag.html [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r208813 r208815  
     12016-11-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=163307
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * platform/URLParser.cpp:
     9        Removed some unnecessary and redundant assertions in iterators, which are inside inner loops.
     10        (WebCore::URLParser::parsedDataView):
     11        (WebCore::URLParser::parse):
     12        Add a parsedDataView that just returns a UChar instead of a StringView for 1-length views.
     13        This speeds up debug builds considerably, which spent most of the time parsing the path
     14        making and destroying these 1-length StringViews.  It can't hurt release builds.
     15        * platform/URLParser.h:
     16
    1172016-11-16  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/Source/WebCore/platform/URLParser.cpp

    r208508 r208815  
    108108ALWAYS_INLINE auto CodePointIterator<LChar>::operator++() -> CodePointIterator&
    109109{
    110     ASSERT(!atEnd());
    111110    m_begin++;
    112111    return *this;
     
    125124ALWAYS_INLINE auto CodePointIterator<UChar>::operator++() -> CodePointIterator&
    126125{
    127     ASSERT(!atEnd());
    128126    unsigned i = 0;
    129127    size_t length = m_end - m_begin;
     
    10691067}
    10701068
     1069ALWAYS_INLINE UChar URLParser::parsedDataView(size_t position)
     1070{
     1071    if (UNLIKELY(m_didSeeSyntaxViolation))
     1072        return m_asciiBuffer[position];
     1073    return m_inputString[position];
     1074}
     1075
    10711076template<typename CharacterType>
    10721077ALWAYS_INLINE size_t URLParser::currentPosition(const CodePointIterator<CharacterType>& iterator)
     
    13131318                authorityOrHostBegin = c;
    13141319            } else {
    1315                 ASSERT(parsedDataView(currentPosition(c) - 1, 1) == "/");
     1320                ASSERT(parsedDataView(currentPosition(c) - 1) == '/');
    13161321                m_url.m_userStart = currentPosition(c) - 1;
    13171322                m_url.m_userEnd = m_url.m_userStart;
     
    16011606                    }
    16021607                    if (windowsQuirk || authorityOrHostBegin == c) {
    1603                         ASSERT(windowsQuirk || parsedDataView(currentPosition(c) - 1, 1) == "/");
     1608                        ASSERT(windowsQuirk || parsedDataView(currentPosition(c) - 1) == '/');
    16041609                        if (UNLIKELY(*c == '?')) {
    16051610                            syntaxViolation(c);
     
    16641669                break;
    16651670            }
    1666             if (UNLIKELY(currentPosition(c) && parsedDataView(currentPosition(c) - 1, 1) == "/")) {
     1671            if (UNLIKELY(currentPosition(c) && parsedDataView(currentPosition(c) - 1) == '/')) {
    16671672                if (UNLIKELY(isDoubleDotPathSegment(c))) {
    16681673                    syntaxViolation(c);
     
    17851790        ASSERT(m_url.m_userStart);
    17861791        ASSERT(m_url.m_userStart == currentPosition(c));
    1787         ASSERT(parsedDataView(currentPosition(c) - 1, 1) == "/");
     1792        ASSERT(parsedDataView(currentPosition(c) - 1) == '/');
    17881793        m_url.m_userStart--;
    17891794        m_url.m_userEnd = m_url.m_userStart;
  • trunk/Source/WebCore/platform/URLParser.h

    r208407 r208815  
    103103    void copyASCIIStringUntil(const String&, size_t length);
    104104    StringView parsedDataView(size_t start, size_t length);
     105    UChar parsedDataView(size_t position);
    105106
    106107    using IPv4Address = uint32_t;
Note: See TracChangeset for help on using the changeset viewer.