Bug 199140

Summary: Platform font class gets needlessly initialized in the Networking process
Product: WebKit Reporter: mitz
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=199119
Attachments:
Description Flags
Use NSClassFromString to avoid unnecessary initialization none

mitz
Reported 2019-06-23 17:27:59 PDT
typeFromObject() in ArgumentCodersCocoa.mm calls [PlatformFont class] which invokes the class’s initializer. This is wasteful to do in the Networking process, which doesn’t use the class otherwise.
Attachments
Use NSClassFromString to avoid unnecessary initialization (4.16 KB, patch)
2019-06-23 17:33 PDT, mitz
no flags
mitz
Comment 1 2019-06-23 17:33:06 PDT
Created attachment 372721 [details] Use NSClassFromString to avoid unnecessary initialization
WebKit Commit Bot
Comment 2 2019-06-23 20:44:57 PDT
Comment on attachment 372721 [details] Use NSClassFromString to avoid unnecessary initialization Clearing flags on attachment: 372721 Committed r246726: <https://trac.webkit.org/changeset/246726>
WebKit Commit Bot
Comment 3 2019-06-23 20:44:59 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4 2019-06-23 20:48:00 PDT
Brent Fulgham
Comment 5 2019-06-24 09:25:07 PDT
Comment on attachment 372721 [details] Use NSClassFromString to avoid unnecessary initialization View in context: https://bugs.webkit.org/attachment.cgi?id=372721&action=review > Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:115 > + if ([object isKindOfClass:platformColorClass()]) Oh, really nice. Thank you guys for improving that!
Note You need to log in before you can comment on or make changes to this bug.