Re: longtasks & hidden windows

Hi Noam!

In the boomerang.js library (and thus in mPulse RUM data), we use LongTasks to generate an aggregate RUM Long Task Time (LTT) metric and as an input to our Time To Interactive (TTI) metric.

Looking at our data for today, about 13% of the page loads we see are marked as fully "hidden", i.e. for as long as boomerang.js is loaded, the page is backgrounded or minimized.  It sounds like in those cases, we would not get any LongTasks reported, and our TTI metric may not work (or would report better-than-expected results).  This could cause some shifts in reported data once this version of Chrome is shipped, so we'd likely want to document the change for our customers.

One other thought – if LongTasks reporting would start/stop as a page transitioned between visible and not (switching between tabs during page load, for example), might it confuse analytics in other ways?  For example if RUM sees LongTasks for some time, then none, then sees LongTasks again, etc – the periods of "hidden" may be reported as "smooth-sailing" where it just wasn't generating any LongTasks data (where it would today).

We can adapt either way, i.e. we may consider disabling TTI calculation if the page is transitioning multiple times between hidden/invisible.

Nic Jansma

[cidimage001.png@01D68B7B.AE0304C0]


he/him
+1.408.650.0848 x70848

Akamai Technologies
150 Broadway
Cambridge, MA 02142





From: Noam Rosenthal <nrosenthal@google.com>
Date: Monday, May 1, 2023 at 10:17 AM
To: "public-web-perf@w3.org" <public-web-perf@w3.org>
Subject: PSA: longtasks & hidden windows
Resent-From: <public-web-perf@w3.org>
Resent-Date: Monday, May 1, 2023 at 10:16 AM

Hola webperfies
I'm planning to introduce a change to the implementation of longtask reporting in chrome, that would fix a few longtask-related issues, but would introduce a new change in behavior: long tasks would only be reported for visible windows.

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1441419<https://urldefense.com/v3/__https:/bugs.chromium.org/p/chromium/issues/detail?id=1441419__;!!GjvTz_vk!WWEbBtKVU30R4-R-tF9PLs5OrO2tUo0amdp91SRdCTB4IgpmqAPW0J31kNxOci4xMyQzKhYsO5nvmrdrcA$>
CL (behind a flag): https://chromium-review.googlesource.com/c/chromium/src/+/4495305<https://urldefense.com/v3/__https:/chromium-review.googlesource.com/c/chromium/src/*/4495305__;Kw!!GjvTz_vk!WWEbBtKVU30R4-R-tF9PLs5OrO2tUo0amdp91SRdCTB4IgpmqAPW0J31kNxOci4xMyQzKhYsO5kF7XrwGw$>

Before moving forward with this, I'd like to surface this to the group and see if anyone is relying on longtasks being reported to hidden windows (e.g. minimized, background tab).

Thoughts? Objections? 👍s?

Received on Tuesday, 2 May 2023 14:44:48 UTC