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

Issue 908552 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 30
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug-Regression



Sign in to add a comment

1%-152.3% regression in system_health.memory_desktop at 610733:610738

Project Member Reported by m...@chromium.org, Nov 26

Issue description

See the link to graphs below.
 
All graphs for this bug:
  https://chromeperf.appspot.com/group_report?bug_id=908552

(For debugging:) Original alerts at time of bug-filing:
  https://chromeperf.appspot.com/group_report?sid=5504f5ea90a7bba803d2ee73a5c382139d69bcc370adb9ce403277d50b9e4ffc


Bot(s) for this bug's original alert(s):

mac-10_12_laptop_low_end-perf
mac-10_13_laptop_high_end-perf

system_health.memory_desktop - Benchmark documentation link:
  https://bit.ly/system-health-benchmarks
Cc: drott@chromium.org beh...@behdad.org
Owner: drott@chromium.org
Status: Assigned (was: Untriaged)
📍 Found significant differences after each of 2 commits.
https://pinpoint-dot-chromeperf.appspot.com/job/130f2e67e40000

Apply morx if there's no GSUB! by behdad@behdad.org
https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz/+/14ff3cbe0f30dea24e1bb175b1e8e41039f6afdc
memory:chrome:all_processes:reported_by_chrome:malloc:allocated_objects_size: 3.649e+08 → No values

Roll HarfBuzz to 2.1.1 plus AAT fixes by drott@chromium.org
https://chromium.googlesource.com/chromium/src/+/c67f53b0b70f33c47159d37f7e59bb44399b0d09
memory:chrome:all_processes:reported_by_chrome:malloc:allocated_objects_size: No values → 9.196e+08

Understanding performance regressions:
  http://g.co/ChromePerformanceRegressions

Benchmark documentation link:
  https://bit.ly/system-health-benchmarks
Cc: behdad@chromium.org
I believe the memory increase are a consequence of moving allocations to HarfBuzz, while they were previously performed by CoreText - this is the nature of this change: Running AAT shaping inside HarfBuzz versus running it in CoreText. When AAT processing is performed in HarfBuzz, I assume the allocations are now traced, whereas they were previously hidden behind calling CoreText API.

I'll look into what we can do about the Taobao performance decrease and see if we can improve things there. 

Overall, however, the HarfBuzz AAT shaping change brings about a 28.9% improvement from ~4.3 seconds down to 3 seconds for html5-full-render https://chromeperf.appspot.com/group_report?keys=agxzfmNocm9tZXBlcmZyFAsSB0Fub21hbHkYgIDQwOT61AoM - so we'd really like to keep this change. They also speed up the blink_perf.layout word-break-break-word benchmark by 16.3%.

Separate measurements of pure shaping performance also bring improvements with system font rendering performance: Compare https://docs.google.com/spreadsheets/d/1aslvatqIBZpvDSnf59aDnwRLXKmJlrMbtSH_5itEaaQ/edit?usp=drive_web&ouid=101230465101683400358


Project Member

Comment 5 by bugdroid1@chromium.org, Nov 29

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

commit 023f5763fc17c435b386782af5b7217ebcb09b15
Author: Dominik Röttsches <drott@chromium.org>
Date: Thu Nov 29 17:02:06 2018

Switch Mac OS HarfBuzz hb_face creation to table copying

Removing the CTFont based construction when rolling to HarfBuzz' native
AAT lead us to falling back to attempting the mmap'ed access to the font
SkStreamAsset. However, the implementation for onOpenStream in
SkTypeface_Mac is highly inefficient and synthesizes a font from copying
all tables. Disable this type of instantiation on Mac and use the table
copy method instead.

This should address memory regression for the HarfBuzz AAT roll [1].

[1] https://chromium.googlesource.com/chromium/src/+/c67f53b0b70f33c47159d37f7e59bb44399b0d09

Bug:  908552 
Change-Id: Ibf19ea6308f34fd4927e2b7fd59cdff20f3aad6d
Tbr: eae@chromium.org, behdad@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1355129
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Behdad Esfahbod <behdad@chromium.org>
Reviewed-by: Ben Wagner <bungeman@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612233}
[modify] https://crrev.com/023f5763fc17c435b386782af5b7217ebcb09b15/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc

Status: Fixed (was: Assigned)
These have all recovered. As much as I sometimes struggle with analysing performance results, this was a helpful warning. Thanks for sheriffing, miu@. 
Issue 909099 has been merged into this issue.

Comment 8 by drott@chromium.org, Jan 17 (5 days ago)

Cc: maxlg@google.com
 Issue 922815  has been merged into this issue.

Sign in to add a comment