Bug 178640 - [iOS] WebProcess::initializeWebProcess spends ~150ms spinning up AVSystemController on some devices
Summary: [iOS] WebProcess::initializeWebProcess spends ~150ms spinning up AVSystemCont...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-21 21:55 PDT by Wenson Hsieh
Modified: 2017-10-22 19:20 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.32 KB, patch)
2017-10-21 22:12 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2017-10-21 21:55:27 PDT
Optimizing this would improve web process bring-up time on certain devices.
Comment 1 Wenson Hsieh 2017-10-21 21:58:21 PDT
<rdar://problem/35113105>
Comment 2 Wenson Hsieh 2017-10-21 22:12:02 PDT
Created attachment 324517 [details]
Patch
Comment 3 youenn fablet 2017-10-22 18:45:21 PDT
Comment on attachment 324517 [details]
Patch

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

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3421
> +        NSError *error = nil;

Is is usually style for mm file to do "NSError *error" in lieu of CPP like "NSError* error"?
Comment 4 Wenson Hsieh 2017-10-22 18:54:26 PDT
Comment on attachment 324517 [details]
Patch

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

Thanks for the review!

>> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3421
>> +        NSError *error = nil;
> 
> Is is usually style for mm file to do "NSError *error" in lieu of CPP like "NSError* error"?

Correct. It's this rule, in the WebKit style guidelines: <https://webkit.org/code-style-guidelines/#pointers-non-cpp>. Although, it seems a common interpretation of this rule (and an interpretation I personally find more useful :)) is that Objective C objects should have a space between the type and the *, while pointers to C++ and C classes and structs should not have an extra space. FWIW, this appears to be the convention followed here, in WebPageIOS.mm, as well as many other Objective-C++ files in WebKit (e.g. search for "FrameView*" in this file).
Comment 5 WebKit Commit Bot 2017-10-22 19:20:23 PDT
Comment on attachment 324517 [details]
Patch

Clearing flags on attachment: 324517

Committed r223827: <https://trac.webkit.org/changeset/223827>
Comment 6 WebKit Commit Bot 2017-10-22 19:20:24 PDT
All reviewed patches have been landed.  Closing bug.