Bug 175618 - 2-3% of main thread time under UTTypeCreatePreferredIdentifierForTag on wunderground map
Summary: 2-3% of main thread time under UTTypeCreatePreferredIdentifierForTag on wunde...
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: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-15 21:35 PDT by Tim Horton
Modified: 2017-08-16 13:51 PDT (History)
5 users (show)

See Also:


Attachments
Patch (23.87 KB, patch)
2017-08-15 21:36 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (24.07 KB, patch)
2017-08-15 21:40 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (24.03 KB, patch)
2017-08-15 21:41 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (24.24 KB, patch)
2017-08-15 21:56 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (24.24 KB, patch)
2017-08-15 22:00 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (24.48 KB, patch)
2017-08-15 22:07 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (24.49 KB, patch)
2017-08-15 22:20 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (23.31 KB, patch)
2017-08-15 23:05 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (23.30 KB, patch)
2017-08-16 11:37 PDT, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>