Slow first layout on text-heavy site on Windows |
|||||
Issue descriptionThe first layout of http://b.hatena.ne.jp/ takes 447ms on ToT Chrome (r409720) on my Windows 10 machine. That is twice as slow as Linux case. It calls IDWriteFactory::CreateGlyphRunAnalysis() 2236 times and that takes 334ms in total, which is 75% of the layout time. The callstack toward IDWriteFactory::CreateGlyphRunAnalysis() is: IDWriteFactory::CreateGlyphRunAnalysis SkScalerContext_DW::getBoundingBox SkScalerContext_DW::generateMetrics SkScalerContext::getMetrics SkGlyphCache::allocateNewGlyph SkGlyphCache::lookupByPackedGlyphID SkGlyphCache::getGlyphIDMetrics sk_getMetrics_glyph_next Note that the performance of IDWF::CGRA() depends on the font it uses. In this case, it uses default font, Yu Gothic, but if I switch it to MSGothic, IDWF::CGRA() gets 3 times as fast as Yu Gothic case. TODO: Check the cache layers Any idea to improve the performance? Is there any lightweight alternative of it?
,
Aug 4 2016
The other question I had - how do your Linux and Windows machines compare in terms of hardware - "twice as slow as on Linux" would probably need to be calibrated by the differences in hardware here?
,
Aug 5 2016
> Any idea on the hit ratio of Skia's glyph cache? How many times do we go down to DWrite to retrieve the metrics (2236) vs. finding the metrics from the SkGlyphCache? On this case, the hit ratio of SkGlyphCache is 85%. SkGlyphCache::lookupByPackedGlyphID was called 12161 times, and within that, 1716 cases went down to DW through allocateNewGlyph. > Can we canonicalize the test case by recording the page using web-page-replay and playing it back from that? Yeah, we should make it. The value changes day by day in wild :-/. > The other question I had - how do your Linux and Windows machines compare in terms of hardware - "twice as slow as on Linux" would probably need to be calibrated by the differences in hardware here? Well, I just compare the raw value of layout time of Linux and Windows, naively assuming the performance of Z620 and Z440 don't differ so much, at least for single core performance and memory access time. I agree we need calibration them to understand the situation precisely.
,
Aug 7 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 9 2017
,
Aug 9
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 9
This is a known problem and is tackled by LayoutNG, progress of which is tracked in issue 591099. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by drott@chromium.org
, Aug 4 2016