[Webkit-unassigned] [Bug 106393] New: Parser/html-parser.html spends 3% of total time in WTF::currentTime() on Android

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 8 15:24:26 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106393

           Summary: Parser/html-parser.html spends 3% of total time in
                    WTF::currentTime() on Android
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: koivisto at iki.fi, abarth at webkit.org,
                    peter at chromium.org, tonyg at chromium.org


Created an attachment (id=181785)
 --> (https://bugs.webkit.org/attachment.cgi?id=181785&action=review)
gzip'd copy of the profile (was too large to attach plain)

Parser/html-parser.html spends 3% of total time in WTF::currentTime() on Android

There are 2 problems here.

1.  WTF::currentTime() is probably not as optimized as it should be on Android (we had this problem in the past for Mac OS X, many many years ago).

2.  Document::didAccessStyleResolver() should be using a timer and a bool instead of polling WTF::currentTime on every access! :)  It could set a "don't reschedule until" timer, which fires and schedules a throw-away.

void Document::didAccessStyleResolver()
{
    static const int timeBeforeThrowingAwayStyleResolverAfterLastUseInSeconds = 60;
    static const int holdOffTimeBeforeReschedulingTimerInSeconds = 5;

    double currentTime = WTF::currentTime();

    if (currentTime > m_lastStyleResolverAccessTime + holdOffTimeBeforeReschedulingTimerInSeconds) {
        m_styleResolverThrowawayTimer.startOneShot(timeBeforeThrowingAwayStyleResolverAfterLastUseInSeconds);
        m_lastStyleResolverAccessTime = currentTime;
    }
}

I guess I'll file separate bugs and relate those back to these?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list