Bug 147313

Summary: [WK2][iOS] WebContent process main thread should have fixed priority
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, kling, rniwa, sam
Priority: P1 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Chris Dumez 2015-07-26 20:50:55 PDT
WebContent process main thread should have fixed priority on iOS 9. Priority decay regresses PLT and fixing the priority gives up a ~3% progression on warm PLT.
Comment 1 Chris Dumez 2015-07-26 20:51:09 PDT
rdar://problem/22003112
Comment 2 Chris Dumez 2015-07-26 20:54:12 PDT
Created attachment 257541 [details]
Patch
Comment 3 Sam Weinig 2015-07-26 21:04:47 PDT
Comment on attachment 257541 [details]
Patch

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

> Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:176
> +    if (parameters.uiProcessBundleIdentifier == "com.apple.mobilesafari")

Why only for MobileSafari? If this is a good idea for MobileSafari, why isn't it a good idea all he time?
Comment 4 Chris Dumez 2015-07-26 21:06:13 PDT
(In reply to comment #3)
> Comment on attachment 257541 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=257541&action=review
> 
> > Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:176
> > +    if (parameters.uiProcessBundleIdentifier == "com.apple.mobilesafari")
> 
> Why only for MobileSafari? If this is a good idea for MobileSafari, why
> isn't it a good idea all he time?

Please see radar for more information.
Comment 5 Chris Dumez 2015-07-26 21:23:01 PDT
Created attachment 257542 [details]
Patch
Comment 6 Chris Dumez 2015-07-26 21:23:46 PDT
(In reply to comment #3)
> Comment on attachment 257541 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=257541&action=review
> 
> > Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:176
> > +    if (parameters.uiProcessBundleIdentifier == "com.apple.mobilesafari")
> 
> Why only for MobileSafari? If this is a good idea for MobileSafari, why
> isn't it a good idea all he time?

I removed the check as discussed offline.
Comment 7 Darin Adler 2015-07-26 21:24:10 PDT
Comment on attachment 257542 [details]
Patch

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

Yuck.

> Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:173
> +#if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000)

No need for the parentheses.
Comment 8 Chris Dumez 2015-07-26 21:30:01 PDT
Created attachment 257544 [details]
Patch
Comment 9 Chris Dumez 2015-07-26 22:09:47 PDT
Comment on attachment 257544 [details]
Patch

Clearing flags on attachment: 257544

Committed r187412: <http://trac.webkit.org/changeset/187412>
Comment 10 Chris Dumez 2015-07-26 22:09:55 PDT
All reviewed patches have been landed.  Closing bug.