You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering what kind of interation this feature will have with the Back-forward cache.
For instance, what happens exactly in the following scenario:
The document create a:
constprofiler=newProfiler({sampleInterval: 10,// Target sampling every 10msmaxBufferSize: 10*100,// Cap at ~10s worth of samples});
The user navigate the main frame elsewhere. The old document enters the BFCache.
The user navigates back. The cached document is re-activated.
The re-activitated document calls:
consttrace=awaitprofiler.stop();
What kind of data trace contains?
You may want to figure out what is the expected behavior and add some tests about this.
When the document enters the BFCache, it's task runners are frozen, so I guess the trace shouldn't include any samples from when it was cached?
The text was updated successfully, but these errors were encountered:
When the document enters the BFCache, it's task runners are frozen, so I guess the trace shouldn't include any samples from when it was cached?
Indeed, this is the behaviour recommended by the spec:
The user agent is RECOMMENDED to pause the sampling of a profiling session if the browsing context is not in the foreground.
Though, this is not required. The Blink implementation for example does not enter the paused state when this occurs, and instead records empty samples for the time that the context/realm is not current (as per the results of executing the take a sample algorithm on a foreign realm).
Perhaps we should consider requiring implementations to pause sampling in this case? I can't think of any cases where the empty sampling would be useful.
Perhaps we should consider requiring implementations to pause sampling in this case? I can't think of any cases where the empty sampling would be useful.
This sounds reasonable. @acomminos, do you think we can update the spec to listen to "fully active" status changes (guide)?
You may want to reference this from the BFCache meta bug:
whatwg/html#5880
+CC @rakina
I was wondering what kind of interation this feature will have with the Back-forward cache.
For instance, what happens exactly in the following scenario:
What kind of data
trace
contains?You may want to figure out what is the expected behavior and add some tests about this.
When the document enters the BFCache, it's task runners are frozen, so I guess the trace shouldn't include any samples from when it was cached?
The text was updated successfully, but these errors were encountered: