Bug 173960 - [Cocoa] Improve performance of font lookups
Summary: [Cocoa] Improve performance of font lookups
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-28 21:00 PDT by Myles C. Maxfield
Modified: 2017-07-31 13:25 PDT (History)
6 users (show)

See Also:


Attachments
Patch (9.26 KB, patch)
2017-06-28 21:03 PDT, Myles C. Maxfield
darin: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (1.93 MB, application/zip)
2017-06-28 22:29 PDT, Build Bot
no flags Details
Patch for committing (9.56 KB, patch)
2017-07-01 18:26 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-06-28 21:00:24 PDT
[Cocoa] Improve performance of font lookups
Comment 1 Myles C. Maxfield 2017-06-28 21:03:08 PDT
Created attachment 314109 [details]
Patch
Comment 2 Myles C. Maxfield 2017-06-28 21:03:28 PDT
<rdar://problem/31996891>
Comment 3 Darin Adler 2017-06-28 21:23:54 PDT
Comment on attachment 314109 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314109&action=review

> Source/WebCore/ChangeLog:11
> +        No new tests because there is no behavior change.

I am taking your word for the fact that there is no behavior change.
Comment 4 Build Bot 2017-06-28 22:29:58 PDT
Comment on attachment 314109 [details]
Patch

Attachment 314109 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4018020

New failing tests:
fast/text/narrow-non-breaking-space.html
fast/ruby/base-shorter-than-text.html
fast/text/font-weights.html
fast/text/text-combine-shrink-on-color-change.html
fast/text/font-weights-zh.html
Comment 5 Build Bot 2017-06-28 22:29:59 PDT
Created attachment 314114 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 6 Myles C. Maxfield 2017-06-28 22:38:51 PDT
It looks like there is a behavior change on iOS. 😐
Comment 7 Jiang Jiang 2017-06-30 17:03:54 PDT
Comment on attachment 314109 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314109&action=review

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:883
> +            CFTypeRef keys[] = { kCTFontEnabledAttribute, postScriptName.startsWith('.') ? kCTFontNameAttribute : kCTFontPostScriptNameAttribute };

Why only use kCTFontPostScriptNameAttribute for visible fonts?
Comment 8 Myles C. Maxfield 2017-07-01 18:20:17 PDT
Comment on attachment 314109 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314109&action=review

>> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:883
>> +            CFTypeRef keys[] = { kCTFontEnabledAttribute, postScriptName.startsWith('.') ? kCTFontNameAttribute : kCTFontPostScriptNameAttribute };
> 
> Why only use kCTFontPostScriptNameAttribute for visible fonts?

It isn't necessary once we fix the case sensitivity problems.
Comment 9 Myles C. Maxfield 2017-07-01 18:26:57 PDT
Created attachment 314395 [details]
Patch for committing
Comment 10 Myles C. Maxfield 2017-07-06 16:04:28 PDT
Committed r219223: <http://trac.webkit.org/changeset/219223>
Comment 11 Alexey Proskuryakov 2017-07-31 13:25:03 PDT
Comment on attachment 314395 [details]
Patch for committing

View in context: https://bugs.webkit.org/attachment.cgi?id=314395&action=review

> PerformanceTests/ChangeLog:9
> +        * Layout/font-fallback-font-family.html: Added.

This test fails, filed bug 174989.