Extremely long time to load page and jump to anchor (24s in Chrome, 1s in Safari)
Reported by
alexande...@xamarin.com,
Jun 3 2016
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.24 Safari/537.36 Example URL: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/204/parsed_console/log_content.html#WARNING1 Steps to reproduce the problem: 1. Open the URL 2. It takes 24 seconds to load and jump to the anchor What is the expected behavior? It should load *much* faster. Safari takes about 1 second to load the page and jump to the anchor. What went wrong? Developer tools show majority of time is spent on "Content download - 24.53 seconds". This started a few releases back. I noticed it when viewing logs from our Jenkins CI got unusably slow in Chrome while it worked fine in Safari. Did this work before? Yes one or two stable releases back Chrome version: 52.0.2743.24 Channel: beta OS Version: OS X 10.11.5 Flash Version: Shockwave Flash 22.0 r0 I've reproduced on Chrome Canary version 53.0.2757.0 canary (64-bit) too, the net-internals-log.json is from that version.
,
Jun 8 2016
@rsleevi Thanks for looking into it, I attached a trace. Since the page takes about 23s to load I let the trace capture all of that instead of the recommended 10s from the article, let me know if I should capture a shorter one. Btw. this is not isolated to my machine, everyone using a Mac+Chrome is hitting this here.
,
Jun 8 2016
Warning to future triagers: I have no idea what I'm doing re: chrome://tracing, but it appears that the stalls (which can last several hundred MS to multiple seconds) appear to be being caused by FrameView::performLayout as part of style/layout calculation. I'm not sure exactly what component this best belongs to, but I'm randomly slapping a Layout label on it and hoping emil would have insight into why Safari does so much better than us for this page.
,
Jun 8 2016
It looks like these layouts are triggered by the background parser continually sending tokens to the main thread. The page is so big that each additional layout is really expensive. sendTokensToMainThread should only be getting invoked on - end of input - script begin - script end My guess is that the bg tokenizer is streaming data as fast as possible and keeps hitting end of input. Adding kouhei@ for further triage, as this could be a parser issue.
,
Jun 8 2016
FWIW I've tested with Edge and Firefox on Windows too and it's pretty much instantaneous there while Chrome shows the same slow loading as on Mac.
,
Jun 8 2016
,
Jun 9 2016
This might be due to a combination of long tokens without spaces (which disables a text shaping cache) and Mac Specific AAT fonts (for which text layout is much slower than other fonts).
,
Jun 9 2016
Loading the file from disk it takes ~27 seconds for the page to render for me. About 7 seconds of that is layout. Changing the font reduces it to about 5 as does removing the pre-wrap style.
,
Jun 9 2016
Interesting :) Saving https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/204/consoleText to disk (== plain text file without html) and loading it up in Chrome shows the same slow behavior.
,
Jun 9 2016
The layout time is mostly spent in shaping (as the cache cannot be used for a majority of the strings). This is especially bad on Mac where AAT shaping is quite slow. This still does not explain the non-layout time though.
,
Jun 15 2016
alexander.koeplinger, could you record a trace with more options enabled (for example, check all categories listed in the left side, as in the screenshot)?
,
Jun 15 2016
,
Jun 15 2016
,
Jun 15 2016
Sorry, I thought with enough options we could see the time-taking task in the trace, but it's not true according to nhiroki@'s tracing. Removed Needs-Feedback label.
,
Jun 21 2016
Regarding #c8: > Changing the font reduces it to about 5 as does removing the pre-wrap style. How did you change the font? Would be awesome if I could use this as a workaround in the meantime :)
,
Sep 6 2016
This is frustratingly slow for me too for similar sized files. I have to download large docs and open them in sublime/whatever nowadays.
,
Sep 6 2016
,
Nov 30 2017
Repro unavailable, unable to reproduce.
,
Dec 1 2017
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by rsleevi@chromium.org
, Jun 8 2016Components: -Internals>Network Blink>Loader
Labels: Needs-Feedback
Status: Untriaged (was: Unconfirmed)