Is this the same thing as Reactive Prefetch (which is enabled on Android)?
I was wondering if we should upgrade the NagivationRequest preconnect trigger to do that too.
Your instinct on the idea is appreciated. I can write a CL if this sounds worth experimenting.
Do we have any data about how much head start time we have for NavigationRequest? Is it mostly consumed by preconnect, or do we have more time? (I guess we have enough head start time only when there is an onbeforeunload handler.) If we have more time, I'm wondering if we should start with prefetching the main resource before prefetching subresources.BTW I'm surprised we are prefetching subresources in LoadingPredictor::MaybeAdd"Preconnect". We should probably refactor the code a bit :)
--Kentaro Hara, Tokyo
TBH I'm not super familiar with the difference between ReactivePrefetch and GlowPlug.
One thing that I can add is that LoadingPredictor also has a local database based subresource origin preconnect [code], which IIUC is different from reactive preconnect?
Context: I was poking around with Omnibox autocomplete predictor code and noticed that "preconnect" there is not actually preconnect but triggers Glowplug prefetch + subresource orrigins preconnect [code].Is this the same thing as Reactive Prefetch (which is enabled on Android)?
TBH I'm not super familiar with the difference between ReactivePrefetch and GlowPlug.
I'm not sure about the history of GlowPlug but my guess is that the idea of GlowPlug was absorbed in ReactivePrefetch and launched.
One thing that I can add is that LoadingPredictor also has a local database based subresource origin preconnect [code], which IIUC is different from reactive preconnect?
Reactive Prefetch is about "prefetch", not "preconnect".
Context: I was poking around with Omnibox autocomplete predictor code and noticed that "preconnect" there is not actually preconnect but triggers Glowplug prefetch + subresource orrigins preconnect [code].Is this the same thing as Reactive Prefetch (which is enabled on Android)?
...and I got the answer myself. It is the same thing :)Reactive Prefetch was enabled on Android in this CL. It is controlled by the flag named "kLoadingPredictorPrefetch". You are now talking about the code behind the flag :)
On Mon, Aug 7, 2023 at 8:56 PM Kouhei Ueno <kou...@google.com> wrote:> Do we have any data about how much head start time we have for NavigationRequest? Is it mostly consumed by preconnect, or do we have more time? (I guess we have enough head start time only when there is an onbeforeunload handler.) If we have more time, I'm wondering if we should start with prefetching the main resource before prefetching subresources.This sounds like the question we should ask for determining if earlier GlowPlug is worth investigating or not.
What do you mean by 'head start time'? I think John is the most familiar with preconnect for NavigationRequest and has more insight than I do.-Scott