New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 901532 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 899983
Owner:
Closed: Nov 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

21ms startup performance regression in icu_63::UnicodeSet::UnicodeSet()

Project Member Reported by wittman@chromium.org, Nov 2

Issue description

Data from the UMA Sampling Profiler shows that the canary population experienced an average regression of 21ms over the first 30 seconds of startup in

72.0.3596.0 canary
Windows 64-bit
renderer process main thread

The regression was detected between versions 72.0.3595.0 and 72.0.3596.0.

The following CL is suspected to have caused the regression because it touched functions that regressed or related code:

revision: 42d5027992a0946942839b8821765e1512afbc21
summary: Update ICU to 63.1 + Chromium patches
author: jshin@chromium.org

Please refer to the detailed execution profile difference for icu_63::UnicodeSet::UnicodeSet() to understand what caused the regression: https://uma.googleplex.com/p/chrome/callstacks?sid=0f18aa31ddb99d4f374d14960de8f79b

 
Status: ExternalDependency (was: Assigned)
 bug 899983  is very likely to have the same root cause as this one. 

There's an upstream bug to speed up a part of the code where the profile data is hot. 

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/deps/icu.git/+/45f655f2feb7069a7b9b47d1b1a596807bfd4220

commit 45f655f2feb7069a7b9b47d1b1a596807bfd4220
Author: Jungshik Shin <jshin@chromium.org>
Date: Thu Nov 08 06:23:05 2018

Cherry-pick: UnicodeSet performance enhancement

The start-up performance regression reported for Android
WebView and Windows Chrome is traced to UnicodeSet creation
for Unicode character properties.

This upstream PR speeds up UnicodeSet creation.

Upstream bug:
  https://unicode-org.atlassian.net/browse/ICU-20250

Upstream PR: https://github.com/unicode-org/icu/pull/265

TBR=ftang@chromium.org

Bug:  899983 , 901532 
Test: Android webview start-up perf.
Change-Id: Iffb6eac4ddde2cabd2f55fe718a9b4e3f39b4e05
Reviewed-on: https://chromium-review.googlesource.com/c/1325398
Reviewed-by: Jungshik Shin <jshin@chromium.org>

[modify] https://crrev.com/45f655f2feb7069a7b9b47d1b1a596807bfd4220/README.chromium
[add] https://crrev.com/45f655f2feb7069a7b9b47d1b1a596807bfd4220/patches/uniset_perf.patch
[modify] https://crrev.com/45f655f2feb7069a7b9b47d1b1a596807bfd4220/source/common/umutablecptrie.cpp

Mike, I'm about to test the above ICU change. Which benchmark should I choose for Windows startup performance at pinpoint ? 

 "tools/perf/run_benchmark list --browser system" does not seem to have anything specific to start-up performance. 
 
Cc: nednguyen@chromium.org
I don't know. +nednguyen do we have a benchmark that covers renderer process startup on Windows?

It's probably also fine to just look at the Sampling Profiler diff between canary versions once we have data from the wild. Assuming the change goes into a release tonight we should have data Saturday.
Cc: -nednguyen@chromium.org nedngu...@google.com crouleau@chromium.org
#5: we removed Windows startup benchmarks last years because folks don't think the benchmark is stable enough (eg: low noise) to provide valuable insights. If any one wants to revive windows startup benchmark, I am happy to provide historical contexts & some improvements people have found that might help to reduce noise.
Thanks for the response. 

I'll just land the CL (Android OS team verified that it almost completely resolved their perf regression (with ICU 63.1) with the same root cause as this bug: UnicodeSet creation). So, hopefully, this issue will be resolved as well. 


Project Member

Comment 8 by bugdroid1@chromium.org, Nov 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f2d5503db76711b8738358ee2272b3ac6fc3d208

commit f2d5503db76711b8738358ee2272b3ac6fc3d208
Author: Jungshik Shin <jshin@chromium.org>
Date: Fri Nov 09 02:25:36 2018

Roll ICU to 45f655f

https://chromium.googlesource.com/chromium/deps/icu.git/+log/834113a..45f655f

45f655f Cherry-pick: UnicodeSet performance enhancement
d2afb05 Delete another empty block after trim data

TBR=ftang@chromium.org,gsathya@chromium.org

Bug:  899983 , 901532 , v8:8414 
Test: Android webview start-up perf
Test: v8: intl/regress-8414.js
Change-Id: Ibc3e84fb26c4b3a158823e9ce6cee709b3161da7
Reviewed-on: https://chromium-review.googlesource.com/c/1325564
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606705}
[modify] https://crrev.com/f2d5503db76711b8738358ee2272b3ac6fc3d208/DEPS

It's a bit odd day today and took more than usual to land the above CL. It may or may not have missed today's canary train. Even if it missed the train, the result from the wild will come back before long. 
Can we declare this a duplicate of  bug 899983 ?
Not sure about the answer to comment 10. But we do have performance data now from the wild. It looks like the change in comment 8 has improved but not fully fixed the regression: it's roughly 8ms slower rather than 20ms.

Here's the improvement between 72.0.3606.0 and 72.0.3607.0:
https://uma.googleplex.com/p/chrome/callstacks?sid=2a7c163b1d400a1dc2d97f487614c92f

And here's the remaining regression -- difference between 72.0.3595.0 and 72.0.3607.0:
https://uma.googleplex.com/p/chrome/callstacks?sid=f554bb0aa999eedcf4e5871e652d522b
Thanks for the regression graphs.

This does show that this is a duplicate of  bug 899983 .

FYI It looks like the second graph would be more meaningful if ICU's entry point renaming was disabled (or if Chromium used a fixed suffix like _cr, not a versioned one like _63). https://htmlpreview.github.io/?https://github.com/unicode-org/icu/blob/master/icu4c/readme.html#RecBuild
That would be great if we can remove the versioned suffix from the ICU symbol names. It would reduce noise in the difference display, and improve the precision of the regression detection results.
Labels: Hotlist-DesktopUIValid Hotlist-DesktopUIChecked
**UI mass Triage**

re: version suffix. it has pros and cons. Anyway, that's bug 463226. 
Project Member

Comment 16 by bugdroid1@chromium.org, Nov 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/deps/icu.git/+/d13a96f4d6e4e4241b8e7aa346a857c206564d9c

commit d13a96f4d6e4e4241b8e7aa346a857c206564d9c
Author: Jungshik Shin <jshin@chromium.org>
Date: Wed Nov 14 17:25:24 2018

Unicoset Perf fix #2

Cherry-pick another upstream patch to improve the performance
of UnicodeSet.

https://github.com/unicode-org/icu/pull/278

Bug:  899983 , 901532 
Test: Android webview start-up perf and Windows perf graph
Change-Id: I2c2a22a398883178734a2c2a6c5975d9551b039e
TBR=ftang@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1335799
Reviewed-by: Jungshik Shin <jshin@chromium.org>

[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/README.chromium
[add] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/patches/uniset_perf2.patch
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/characterproperties.cpp
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/ucptrie.cpp
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/umutablecptrie.cpp
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/unicode/uniset.h
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/uniset.cpp
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/uniset_closure.cpp
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/uniset_props.cpp
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/uprops.h
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/uset.cpp
[modify] https://crrev.com/d13a96f4d6e4e4241b8e7aa346a857c206564d9c/source/common/usetiter.cpp

Project Member

Comment 17 by bugdroid1@chromium.org, Nov 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7344a24efd2a222d6d45b709767cd4d050af10a3

commit 7344a24efd2a222d6d45b709767cd4d050af10a3
Author: Jungshik Shin <jshin@chromium.org>
Date: Sun Nov 18 01:37:31 2018

Roll ICU to 407b393 from 45f655f

  https://chromium.googlesource.com/chromium/deps/icu.git/+log/45f655f..407b393

The following changes are included:

  407b393 Update IANA timezone db to 2018g
  797b7c7 Add more locale variants
  d13a96f Unicoset Perf fix #2
  ecae5c0 Adjust calendar locale data trimming on Andorid

The ICU data files for mobile platforms got smaller. For desktop,
the size got increased by ~59 kb for more locale variant support.

TBR=ftang@chromium.org

Bug: 473288,863749, 899983 , 901532 , v8:8432 
Test: v8: intl/regress-8413*
Test: Android webview start-up perf and Windows perf graph
Test: See  crbug.com/900232 
Test: See ICU 407b393 CL description for tz test.
Change-Id: Id3ec92cbbe82275b120ffa9747e110db598905dc
Reviewed-on: https://chromium-review.googlesource.com/c/1341468
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609129}
[modify] https://crrev.com/7344a24efd2a222d6d45b709767cd4d050af10a3/DEPS

Mergedinto: 899983
Status: Duplicate (was: ExternalDependency)
Android start-up time in  bug 899983  (after the 2nd ICU patch) went back to the previous level. So, this one should be resolved as well. Duping this one to that one. 
This regression appears to have been completely resolved with the change in comment 17. The diff between 72.0.3595.0 and 72.0.3614.0 shows we now have a negligible performance difference of -77.6μs: https://uma.googleplex.com/p/chrome/callstacks?sid=7ce523530e88c6b93039f7bffc20a0b0

Sign in to add a comment