navigation-timing
navigation-timing copied to clipboard
Extend 'NavigationType' to include User Agent Launch
One of the challenges we've had at Microsoft is measuring the performance impact of a cold start launch for a particular site. This particularly apparent in PWA scenarios where the browser engine is launched and terminated frequently, such as in the case of Electron or WebView applications. Under this scenario, the browser is in a non-optimal state and measurements in the structure wouldn't necessarily reflect that of a normal navigation and could produce a false positive in telemetry aggregates.
We propose extending the NavigationType
enumeration with a new item, useragent_launch
, in order to signal to a developer that this particular event is taken from a launch scenario rather than a traditional navigation scenario.
Explainer: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PerformanceNavigationTiming%20for%20User%20Agent%20Launch/explainer.md
Chromium Status: https://chromestatus.com/feature/5186950448283648
I plan to discuss this at the next WebPerfWG call on June 9th.
@yoavweiss you mentioned a follow-up to figure out how to map browser launch to HTML concepts, what would be the appropriate next step here?
@domenic - do you know if there's an HTML concept that we can map to that can distinguish between a navigation that was initiated alongside a browser startup vs. navigations that weren't?
There is no such concept.
@domenic - Any advice on how such a concept may be added?
I don't think I have any special guidance in this area, beyond the usual of trying to write specs in enough detail that they are interoperably implementable.
What are the expected effects on PerformanceNavigationTiming
metrics for this new useragent_launch
NavigationType
? Will the start up time incurred from cold starting the user agent be included as a new metric? Or does TimeOrigin
already account for this? In other words, will developers be able to measure the app start up duration, i.e. the time before startTime
, redirectStart
, etc?
@marcelduran this proposal does not intend to change the definitions of the timings, however we are working on a separate follow-up proposal that does.
Based on the conversation in https://github.com/whatwg/html/issues/8150 about the change to "push" and "replace", it doesn't appear that we need to have a 1:1 mapping to an HTML historyHandling
types for this change. We should be OK to add useragent_launch
to the NavigationType enumeration.
@bmathwig - what did you have in mind in terms of spec language?
We have been hearing from partners that they really want a 'launch time' as well - so they can measure the full e2e time between the user launching a shortcut or a file (for file handling w/ installed app) to, say, getting that file in the launchQueue or the page loading.
I'm guessing we would need to add more information to the navigation to add this in there?
@marcelduran this proposal does not intend to change the definitions of the timings, however we are working on a separate follow-up proposal that does.
Great @amiyagupta! Would you mind linking the proposal here once available?
closing the loop a little bit - I made a request here to modify this proposal a tad: https://github.com/MicrosoftEdge/MSEdgeExplainers/issues/614