Bug 184899 - Investigate a better heuristic for when to prewarm a process
Summary: Investigate a better heuristic for when to prewarm a process
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-23 15:29 PDT by Saam Barati
Modified: 2018-05-09 10:51 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2018-04-23 15:29:37 PDT
Some ideas:
- on the 'load' event
- a timer X ms after the 'load' event.

Or some combination of a timer an load event or first paint.

Perhaps there are other heuristics as well
Comment 1 Saam Barati 2018-04-23 17:23:40 PDT
one way the current heuristic falls down is:
- load "a.com" <-- does prewarm a process
- press a link on "a.com" going to "b.com" <-- uses the prewarmed process
- Go back (to "a.com" <--- does not prewarm a process
- press a link on "a.com" for "c.com" <-- does not use a prewarmed process because one doesn't exist

So we should take into account prewarming a process when using back/forward cache
Comment 2 Saam Barati 2018-04-23 17:26:17 PDT
(In reply to Saam Barati from comment #1)
> one way the current heuristic falls down is:
> - load "a.com" <-- does prewarm a process
> - press a link on "a.com" going to "b.com" <-- uses the prewarmed process
> - Go back (to "a.com" <--- does not prewarm a process
> - press a link on "a.com" for "c.com" <-- does not use a prewarmed process
> because one doesn't exist
> 
> So we should take into account prewarming a process when using back/forward
> cache

actually, I'm off here. Maybe we don't need to do anything, since we do end up using a prewarmed process for "c.com", because "b.com" will prewarm a process
Comment 3 Radar WebKit Bug Importer 2018-05-09 09:52:08 PDT
<rdar://problem/40094910>
Comment 4 Geoffrey Garen 2018-05-09 09:53:24 PDT
I think we also need to merge navigation process prewarming with the process prewarming we already do to speed up launch.
Comment 5 Saam Barati 2018-05-09 10:18:36 PDT
(In reply to Geoffrey Garen from comment #4)
> I think we also need to merge navigation process prewarming with the process
> prewarming we already do to speed up launch.

Merge in what sense? They both call the same codepath if that’s what you mean
Comment 6 Geoffrey Garen 2018-05-09 10:51:59 PDT
> Merge in what sense? They both call the same codepath if that’s what you mean

Yeah, I guess that's what I mean. :P