Commit 3bf27e1b authored by marja@chromium.org's avatar marja@chromium.org

Fix WebCore.Scripts.ParsingBlocking.TimeBetweenLoadedAndCompiled UMA some more.

Resources which were already loaded and then revalidated were skewing the data:
load time was coming from the already loaded resource, compile time was the new
compilation time.

R=jochen@chromium.org
BUG=

Review URL: https://codereview.chromium.org/562653005

git-svn-id: svn://svn.chromium.org/blink/trunk@181895 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent de8c2d6b
......@@ -250,12 +250,17 @@ void HTMLScriptRunner::requestParsingBlockingScript(Element* element)
ASSERT(m_parserBlockingScript.resource());
m_parserBlockingScriptAlreadyLoaded = m_parserBlockingScript.resource()->isLoaded();
// Exclude already loaded resources (from memory cache) and reloads from the
// computation of
// WebCore.Scripts.ParsingBlocking.TimeBetweenLoadedAndCompiled (done after
// the script is compiled).
m_parserBlockingScriptAlreadyLoaded = m_parserBlockingScript.resource()->isLoaded() || m_parserBlockingScript.resource()->resourceToRevalidate();
blink::Platform::current()->histogramEnumeration("WebCore.Scripts.ParsingBlocking.AlreadyLoaded", m_parserBlockingScriptAlreadyLoaded ? 1 : 0, 2);
// We only care about a load callback if resource is not already
// in the cache. Callers will attempt to run the m_parserBlockingScript
// if possible before returning control to the parser.
if (!m_parserBlockingScriptAlreadyLoaded)
if (!m_parserBlockingScript.resource()->isLoaded())
m_parserBlockingScript.watchForLoad(this);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment