-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long tasks in the report #10705
Comments
Nice. I extended that a tad more: const longtasks = [...tasks].sort((a, b) => b.duration - a.duration).filter(t => t.duration >= 50 && t.unbounded === false);
const also = longtasks.map(t => ({
url: BootupTime.getAttributableURLForTask(t, jsURLs),
group: t.group.label,
start: t.startTime,
self: t.selfTime,
duration: t.duration
}));
console.table(also);
we can, but let's start with the table. the timeline viz scope can get big really quick so i wanna make sure we ship some basic ground truth and then augment from there.
good call. up to 20-ish sg.
different yes. seems like Other happens when most of the time is attributed to events like these. (which seems weird as they are fired at the toplevel/scheduler-level.) i don't think we should filter either out as Other/Unattributable can still mess up your FID/TBT/TTI
yeah seems pretty reasonable. |
If we're reporting these to users, you'll want to filter down to toplevel tasks only (which will all be "Other"), use duration not selftime, and then probably aggregate the attributeable URLs of all its subtasks. tasks.filter(task => !task.parent)
// something here to find all children and combine all URLs
I agree we should not filter these out. I know it sucks because the site developer can't do anything about it, it's essentially all on chromium developers to lower that cost, but it can be large and important to know where it came from.
Would definitely like a big heads up before the release of that :) I love the idea, but I know it will break a few things that rely on the structure of bootup-time audit in the HTTPArchive crawl, so it would be awesome if we could time it in between months if possible. |
So each long toplevel task could be a row (start time + duration), and there could be subrows (url + task type + duration) for individual subtasks?
Adding subrows shouldn't break programmatic usage. |
I was mostly talking about the surfacing of the tasks in bootup time here. I agree, we should feel free to use the full task tree as subrows in the separate audit 👍
Fair enough there are definitely ways of doing this in a non-breaking way. I probably misinterpreted what was planned for the table. If it ends up changing any of the status quo: 1 item per script, |
If this is specifically to help TTI/TBT (and especially if we want to include It's going to be weird to suggest fixing a long task after TTI to improve TTI. Softening the language of what the diagnostic is suggesting (beyond just TTI, long tasks aren't great) could help with that, I guess. |
A good point, though I'm not sure this happens that much in practice given our current graph relationships and network quiet settings. It would be very interesting to see though, Nice 🤓 🔫 |
FYI, we haven't had any discussions at all about this, it's a new idea I'm seeking feedback on. Sorry I wasn't clear. |
Ah gotcha, from Paul's assignment to @Beytoven I thought it might be imminent. Then consider my feedback a +1 to non-breaking ways of surfacing the subrows in the bootup-time audit! 👍 |
So is there consensus on a preferred approach here? It seems like everyone may be okay with either approach but is anyone leaning more one way or the other? @connorjclark @paulirish @patrickhulce |
We want to surface the longest 20 toplevel tasks (I think these are marked 'Other' and have no parent) in a table. And for each item, we want subrows of the "longish" tasks within (not sure if this will be a lot of subrows, if so we may want to filter it). A good start would be everything but the subrow part, and then open a draft PR. |
blocked by #10942 |
|
|
Data is all exposed in the long-tasks audit now. The next big work here is visualizing it to make it more grokkable and actionable. Tracked by #10806 |
We want to show more information about long tasks, in order to help reduce TTI/TBT.
First: a new "long tasks" diagnostic audit. We've been talking about this. Idea is to show the 5 longest tasks.
Quick way to preview the long tasks–in bootup-time.js:
Second: (new idea, please discuss) augment
bootup-time
with long tasksWe could add subrows for each script, listing the top n long script tasks.
The text was updated successfully, but these errors were encountered: