Bug 138848

Summary: Don't let web process go to suspended state if there is active network request.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, ddkilzer, mitz, sam, thorton
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 138582    
Bug Blocks:    
Attachments:
Description Flags
Also acquire the activity token when we have active network requests on progress. thorton: review-

Description Yongjun Zhang 2014-11-18 15:54:33 PST
<rdar://problem/18846532>
Comment 1 Yongjun Zhang 2014-11-18 16:25:23 PST
Created attachment 241829 [details]
Also acquire the activity token when we have active network requests on progress.
Comment 2 Tim Horton 2014-11-18 16:35:19 PST
Comment on attachment 241829 [details]
Also acquire the activity token when we have active network requests on progress.

It seems very wrong to keep the Web process from going to sleep for very long XHR/etc., seems like this will just result in a lot of very awake processes consuming all of your power, no?
Comment 3 Yongjun Zhang 2014-11-18 16:41:23 PST
(In reply to comment #2)
> Comment on attachment 241829 [details]
> Also acquire the activity token when we have active network requests on
> progress.
> 
> It seems very wrong to keep the Web process from going to sleep for very
> long XHR/etc., seems like this will just result in a lot of very awake
> processes consuming all of your power, no?

With the changes in https://bugs.webkit.org/show_bug.cgi?id=138582, we won't track long XHR or sub-resources after the main frame has loaded, and these sub-resources won't keep the process awake.
Comment 4 Alexey Proskuryakov 2014-11-18 22:24:16 PST
It may be worth re-titling the bug for accuracy, "active network request" may not be the best description for what progress tracker does.
Comment 5 Yongjun Zhang 2014-11-19 21:49:52 PST
This patch has the risk of holding web process too long if there is a long lasting XHR that has started before main frame has loaded. I will look at a different approach.