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

Show render blocking (Chrome 92) and largest contentful paint. #278

Merged
merged 5 commits into from
Jun 9, 2021

Conversation

soulgalore
Copy link
Collaborator

In the coming Chrome 92 the render blocking info will be fixed and potentially work as it should. That means we can highlight which assets that are render blocking (and potentially render blocking).

We can also highlight the image (if it is an image) that is the largest contentful paint object.

I prepared HARs generated from Chrome/Edge in Browsertime to include this info and plan to release it when Chrome 92 is released.

@micmro I'm not a sure how to best highlight those, this is what it looks like at the moment:

renderblocking

lcp

In the coming Chrome 92 the render blocking info will be fixed and
potetntially work as it should. That means we can highlight which assets
that are render blocking (and potentially render blocking).

We can also highlight the image (if it is an image) that is the
largest contentful paint object.

I prepared HARs generated from Chrome/Edge in Browsertime to include
this info and plan to release it when Chrome 92 is released.
soulgalore added a commit to soulgalore/DefinitelyTyped that referenced this pull request Jun 3, 2021
In Browsertime and coming Chrome 92 we will have support for knowing if a request is render blocking or not. We also will be able to know if an image is the largest Contentful paint (or not).

See micmro/PerfCascade#278
src/css-raw/perf-cascade.css Outdated Show resolved Hide resolved
src/ts/transformers/helpers.ts Outdated Show resolved Hide resolved
@@ -37,7 +37,7 @@ function makeBlock(rectData: RectData, className: string) {
foreignElLazy = (getParentByClassName(rect, "water-fall-chart") as Element)
.querySelector(".tooltip") as SVGForeignObjectElement;
}
showDelayTimeOut = setTimeout(() => {
showDelayTimeOut = window.setTimeout(() => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change that sorry, it didn't work without for me it shouldn't be in this commit.

typescript-bot pushed a commit to DefinitelyTyped/DefinitelyTyped that referenced this pull request Jun 4, 2021
…soulgalore

* Adding render blocking and LCP info

In Browsertime and coming Chrome 92 we will have support for knowing if a request is render blocking or not. We also will be able to know if an image is the largest Contentful paint (or not).

See micmro/PerfCascade#278

* Fix whitespace
@soulgalore
Copy link
Collaborator Author

I'm gonna push a example HAR in the repo so we have that and then do a little more testing.

@soulgalore
Copy link
Collaborator Author

Hmm this works fine in Chrome and Firefox and not in Safari:
Firefox:
Screenshot 2021-06-09 at 16 55 32

Chrome:
Screenshot 2021-06-09 at 16 55 39

Safari:
Screenshot 2021-06-09 at 16 55 47

@soulgalore
Copy link
Collaborator Author

It works in Safari for the redirect (where the background color is set to yellow) let me test tonight if I can get it to work.

@soulgalore
Copy link
Collaborator Author

Argh, looking at the server log I could see that I had a service worker on my localhost, serving wrong content for Safari. It works fine.

@soulgalore soulgalore merged commit 0493bb9 into main Jun 9, 2021
@soulgalore soulgalore deleted the render-and-lcp branch June 9, 2021 19:37
@micmro
Copy link
Owner

micmro commented Jun 10, 2021

Thanks @soulgalore!
It's released with v2.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants