RESOLVED FIXED 185951
Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds
https://bugs.webkit.org/show_bug.cgi?id=185951
Summary Some of the work in initializeLogChannelsIfNecessary() is unnecessary for rel...
Chris Dumez
Reported 2018-05-24 10:08:30 PDT
Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds and slows down launch time. In particular, it is unnecessary to read NSDefaults to figure out which logging channels should be enabled.
Attachments
Patch (9.56 KB, patch)
2018-05-24 10:23 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-05-24 10:17:26 PDT
Sample Count, Samples %, CPU %, Symbol 17, 0.2%, 0.1%, WebKit::InitializeWebKit2() (in WebKit) 17, 0.2%, 0.1%, std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) (in libc++.1.dylib) 17, 0.2%, 0.1%, WebKit::runInitializationCode(void*) (in WebKit) 11, 0.1%, 0.1%, WebCore::initializeLogChannelsIfNecessary(std::optional<WTF::String>) (in WebCore) 6, 0.1%, 0.0%, WebCore::logLevelString() (in WebCore) 5, 0.1%, 0.0%, +[NSUserDefaults(NSUserDefaults) standardUserDefaults] (in Foundation) 5, 0.1%, 0.0%, -[NSUserDefaults(NSUserDefaults) init] (in Foundation) 5, 0.1%, 0.0%, +[NSLocale currentLocale] (in CoreFoundation) 1, 0.0%, 0.0%, -[NSUserDefaults(NSUserDefaults) stringForKey:] (in Foundation) 5, 0.1%, 0.0%, WTFInitializeLogChannelStatesFromString (in JavaScriptCore) 5, 0.1%, 0.0%, os_log_create (in libsystem_trace.dylib)
Chris Dumez
Comment 2 2018-05-24 10:23:47 PDT
Geoffrey Garen
Comment 3 2018-05-24 11:39:08 PDT
Comment on attachment 341204 [details] Patch r=me
WebKit Commit Bot
Comment 4 2018-05-24 12:23:05 PDT
Comment on attachment 341204 [details] Patch Clearing flags on attachment: 341204 Committed r232158: <https://trac.webkit.org/changeset/232158>
WebKit Commit Bot
Comment 5 2018-05-24 12:23:07 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-05-24 12:24:21 PDT
Note You need to log in before you can comment on or make changes to this bug.