Startup performance regressed due to ICU changes |
||||
Issue descriptionStartup performance regressed due to ICU changes. According to UMA sampling profiler, GetScriptOfBrowserLocale - which is backed by ICU - regressed recently. It's called on the startup codepath and in 55.0.2880.4 Canary it took 18ms on average while in 56.0.2914.1 Canary it now takes 32ms. Here's the data: https://uma.googleplex.com/callstacks?sid=138ba35b17579bd1bb99c25371bb9726 https://uma.googleplex.com/callstacks?sid=756e3d4cb5cbe9d8fa96538b74741d66 The links above show the call breakdown where time is being spent. jshin@, could you take a look?
,
Nov 15 2016
Hmm.... |init_entry| in icu/source/common/uresbund.cpp didn't change between ICU 56 and 58. According to the UMA, it's |init_entry| that calls res_getTableItemByKey, but I couldn't find a connection between two (didn't look hard enough, though). And in m56, res_getTableItemByKey did not show up at all. BTW, icu/source/data/misc/likelySubtags.txt got bigger by more than 50% (1173 entries to 1804 entries). That may partly account for slow down.
,
Nov 16 2016
Right, it could be that the input data file is such that it makes the performance of that function much slower. I suspect init_entry() calls something that calls res_getTableItemByKey() and that intermediate thing gets inlined.
,
Nov 18 2016
A few alternatives (if I can't speed up ICU): 1. Do not call GetScriptOfBrowserLocale(). As commented in the file, it may not be necessary now that we have a font configuration extension (available for install from Settings page) for per-script font settings. 2. Hardcode 'locales to script' mapping for more frequently used UI locales (we already do that for CJK anyway). 3. Drop newly added entries in likelySubtags.txt (if that indeed caused the slow down). BTW, what's a good way to collect the stat for start-up performance 'locally' (as opposed to UMA)?
,
Nov 18 2016
+wittman I'm not sure there's a good way to repro things locally in the same way that UMA Sampling Profiler is capturing things - but maybe wittman@ has ideas. Otherwise, you could try just recording base::TimeTicks::Now() around the call and subtracting the difference to see if that shows an effect.
,
Nov 19 2016
Timing using base::TimeTicks::Now() when running Chrome from a cold start is likely to be the best approximation you can do locally. (Most startup slowdown is due to waiting on I/O.)
,
May 22 2018
,
May 22 2018
Triage: WontFixing due to inactivity. Feel free to reopen if there's more data. |
||||
►
Sign in to add a comment |
||||
Comment 1 by asvitk...@chromium.org
, Nov 15 2016