Bug 175618

Summary: 2-3% of main thread time under UTTypeCreatePreferredIdentifierForTag on wunderground map
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bdakin, commit-queue, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Tim Horton 2017-08-15 21:35:27 PDT
2-3% of main thread time under UTTypeCreatePreferredIdentifierForTag on wunderground map
Comment 1 Tim Horton 2017-08-15 21:36:00 PDT
Created attachment 318222 [details]
Patch
Comment 2 Tim Horton 2017-08-15 21:40:12 PDT
Created attachment 318223 [details]
Patch
Comment 3 Tim Horton 2017-08-15 21:41:47 PDT
Created attachment 318224 [details]
Patch
Comment 4 Simon Fraser (smfr) 2017-08-15 21:53:30 PDT
Comment on attachment 318224 [details]
Patch

r=me if you fix the iOS build.
Comment 5 Tim Horton 2017-08-15 21:56:28 PDT
Created attachment 318226 [details]
Patch
Comment 6 Tim Horton 2017-08-15 22:00:57 PDT
Created attachment 318227 [details]
Patch
Comment 7 Tim Horton 2017-08-15 22:07:17 PDT
Created attachment 318230 [details]
Patch
Comment 8 Tim Horton 2017-08-15 22:20:57 PDT
Created attachment 318233 [details]
Patch
Comment 9 Tim Horton 2017-08-15 23:05:46 PDT
Created attachment 318237 [details]
Patch
Comment 10 Tim Horton 2017-08-15 23:06:32 PDT
😭
Comment 11 Alexey Proskuryakov 2017-08-16 07:56:20 PDT
Comment on attachment 318237 [details]
Patch

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

> Source/WebCore/platform/network/mac/UTIUtilities.mm:90
> +    static NeverDestroyed<TinyLRUCache<String, String, 16, UTIFromMIMETypeCachePolicy>> cache;

Is this code only ever called from main thread?
Comment 12 Tim Horton 2017-08-16 10:50:32 PDT
(In reply to Alexey Proskuryakov from comment #11)
> Comment on attachment 318237 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=318237&action=review
> 
> > Source/WebCore/platform/network/mac/UTIUtilities.mm:90
> > +    static NeverDestroyed<TinyLRUCache<String, String, 16, UTIFromMIMETypeCachePolicy>> cache;
> 
> Is this code only ever called from main thread?

I believe so (looking through the callers). I threw an assert in and am running the tests, and I'll keep it in the landed patch.
Comment 13 Tim Horton 2017-08-16 11:37:55 PDT
Created attachment 318276 [details]
Patch
Comment 14 WebKit Commit Bot 2017-08-16 13:49:51 PDT
Comment on attachment 318276 [details]
Patch

Clearing flags on attachment: 318276

Committed r220808: <http://trac.webkit.org/changeset/220808>
Comment 15 WebKit Commit Bot 2017-08-16 13:49:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 16 Radar WebKit Bug Importer 2017-08-16 13:51:01 PDT
<rdar://problem/33925934>