Skip to content
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

Misleading NavigationStart lines in this profile #5104

Open
mstange opened this issue Aug 29, 2024 · 1 comment
Open

Misleading NavigationStart lines in this profile #5104

mstange opened this issue Aug 29, 2024 · 1 comment
Labels
bug Very important to fix, typically this means that the tool is broken or lying markers Anything to do with marker data structures, marker chart, or the marker table

Comments

@mstange
Copy link
Contributor

mstange commented Aug 29, 2024

Profile: https://share.firefox.dev/3XoGIs0

This profile has 5 Navigation:Start markers. The third marker is the one that indicates the actual navigation start of the page. I'm not sure what the other 4 are for.
In the network track, there is no vertical line for that third marker. Why not?
The first two Navigation:Start markers definitely have vertical lines. But those lines are not useful because I think they're for subframes.
The third Navigation:Start marker is the only one which has a "Page" row in the tooltip.

Would it make sense to only draw these vertical lines if we have the "Page" information?

Screenshot 2024-08-29 at 4 16 03 PM

@julienw
Copy link
Contributor

julienw commented Aug 30, 2024

I'm not sure why these other Navigation::Start have no payload at all. I would think this is a bug, that they should have a payload and a Page as well, but I'm not sure.

I totally agree that this is confusing. I'd go one step further than you, I think that we should only display those that are for the top level frame (we have this information as soon as we have the Page information).
IMO the same issue happens for all other lines too, especially the Load.

The code to filter these markers is in

export function isNavigationMarker({ name, data }: Marker) {
if (name === 'TTI') {
// TTI is only selectable by name, as it doesn't have a structured payload.
return true;
}
if (
name === 'FirstContentfulPaint' ||
name === 'FirstContentfulComposite' ||
name === 'LargestContentfulPaint'
) {
// Add the performance metric markers.
return true;
}
if (!data) {
// This marker has no payload, only consider the name.
if (name === 'Navigation::Start') {
return true;
}
return false;
}
if (data.category === 'Navigation') {
// Filter by payloads.
if (name === 'Load' || name === 'DOMContentLoaded') {
return true;
}
}
return false;
}

You can see that there's a special case for Navigation::Start without a payload. The third one has a payload but doesn't have a property "category", and it wouldn't be selected anyway.
I think this simply hasn't been updated when the Page information was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1701524.

Longer term we could add a value timeline-network to this enum:

export type MarkerDisplayLocation =
and use it.

@julienw julienw added bug Very important to fix, typically this means that the tool is broken or lying markers Anything to do with marker data structures, marker chart, or the marker table labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Very important to fix, typically this means that the tool is broken or lying markers Anything to do with marker data structures, marker chart, or the marker table
Projects
None yet
Development

No branches or pull requests

2 participants