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

Issue 608650 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 607073



Sign in to add a comment

Store FontPlatformData in FontCache without font size

Project Member Reported by tzik@chromium.org, May 3 2016

Issue description

blink::FontCache associates FontPlatform with the font size. However on other platforms than Mac, typefaces are independent of the font size and can be shared on different font sizes.
We should remove the font size from FontCacheKey to make the cache coarser grained, so that we can reduce the heavy font query in the layout phase.

Context:
https://codereview.chromium.org/1919183002/
https://codereview.chromium.org/1931393002/
 

Comment 1 by tzik@chromium.org, May 3 2016

Components: Blink>Fonts
Labels: Performance
Cc: kouhei@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, May 10 2016

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

commit fe669432f4eca6a0948012858b459fd2631a72da
Author: tzik <tzik@chromium.org>
Date: Tue May 10 00:39:57 2016

Move most of FontRenderStyle manipulation code into its own file

This CL isolates FontPlatformData::m_style handling into its
method, so that m_style is easy to move from FontPlatformData
to SimpleFontData.

BUG= 608650 

Review-Url: https://codereview.chromium.org/1944993003
Cr-Commit-Position: refs/heads/master@{#392494}

[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/exported/linux/WebFontRenderStyle.cpp
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/fonts/FontPlatformData.h
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinux.cpp
[add] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/fonts/linux/FontRenderStyle.cpp
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/platform/fonts/linux/FontRenderStyle.h
[modify] https://crrev.com/fe669432f4eca6a0948012858b459fd2631a72da/third_party/WebKit/Source/web/linux/WebFontRendering.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, May 20 2016

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

commit d9ea08ed34d022152362130ae95f55fbd814a3af
Author: tzik <tzik@chromium.org>
Date: Fri May 20 07:02:41 2016

Introduce FontCache content scaling

FontPlatformData stored in FontCache has size-independent backing font
data on non-Mac platform, and can be safely reused for different font
sizes by scaling.
This CL modifies FontCache to reuse a FontPlatformData to different size
of font, so that Blink's layout phase requires smaller number of expensive
synchronous IPCs.

This reduces the first layout time of text-heavy CJK sites on Linux.
E.g. reduces layout time of http://b.hatena.ne. jp/ from 740ms to 515ms,
and https://ja-jp.facebook.com/legal/terms from 453ms to 428ms.

BUG= 608650 

Review-Url: https://codereview.chromium.org/1962263002
Cr-Commit-Position: refs/heads/master@{#395022}

[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/chrome/app/generated_resources.grd
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/chrome/browser/about_flags.cc
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/content/child/runtime_features.cc
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/content/public/common/content_features.cc
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/content/public/common/content_features.h
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/third_party/WebKit/Source/platform/fonts/FontCache.cpp
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/third_party/WebKit/Source/platform/fonts/FontCache.h
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/third_party/WebKit/Source/platform/fonts/FontCacheKey.h
[modify] https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af/tools/metrics/histograms/histograms.xml

Blocking: 607073

Comment 7 by benhenry@google.com, Jul 13 2017

Cc: kenjibaheux@chromium.org
Labels: -Performance Performance-Memory
This is quite an old bug. Kenji - can we close this?
Status: Fixed (was: Assigned)
Yes, I think it should have been closed long ago.
Cc: drott@chromium.org ebra...@gnu.org e...@chromium.org kojii@chromium.org
Cc: behdad@chromium.org
Cc: bunge...@chromium.org
> on other platforms than Mac

This can have a better granularity I guess, just checking availability of `trak` table using current available harfbuzz API, or, making harfbuzz to provide an API for it. After that I guess it would be nice to make it default and remove the flag, if suitable. 
File new bug.
Issue 909884

Sign in to add a comment