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

feat(audits): Add initial perf audits #10015

Merged
merged 14 commits into from
Feb 14, 2024
Merged

feat(audits): Add initial perf audits #10015

merged 14 commits into from
Feb 14, 2024

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Feb 7, 2024

Changes

This PR adds a beginning of perf audits and infrastructure for it, most notably, this includes a server-render-time and client-render-time attribute on islands, allowing us to provide audits when an island take a suspicious amount of time to render.

Testing

Added some tests!

Docs

N/A

Copy link

changeset-bot bot commented Feb 7, 2024

🦋 Changeset detected

Latest commit: bfdf79b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added 🚨 action Modifies GitHub Actions pkg: astro Related to the core `astro` package (scope) labels Feb 7, 2024
Copy link
Contributor

github-actions bot commented Feb 7, 2024

⚖️ Bundle Size Check

Latest commit: bfdf79b

File Old Size New Size Change
dev-toolbar/apps/audit/index 18.9 KB 21.47 KB + 2.58 KB
dev-toolbar/apps/audit/perf 0 B 2.4 KB + 2.4 KB
dev-toolbar/apps/utils/highlight 1003 B 1.04 KB + 60 B

@github-actions github-actions bot added the semver: minor Change triggers a `minor` release label Feb 7, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@Princesseuh Princesseuh marked this pull request as ready for review February 7, 2024 20:09
@Princesseuh Princesseuh added this to the 4.4 milestone Feb 7, 2024
Comment on lines 182 to 184
const hydrator = this.hydrator(this);
if (process.env.NODE_ENV === 'development') hydrationTimeStart = performance.now();
await this.hydrator(this)(this.Component, props, slots, {
await hydrator(this.Component, props, slots, {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if this actually does something, but when testing locally, I was getting times that made a bit more sense and were generally more stable 🤷‍♀️

Comment on lines +62 to +64
title: 'Use videos instead of GIFs for large animations',
message:
'This GIF could be replaced with a video to reduce its file size and improve performance.',
Copy link
Member

Choose a reason for hiding this comment

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

We should tell the user what "large" means, maybe by explicitly tell the user what's the threshold of this audit

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

For the sake of a visible checkmark, docs is approving!

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@Princesseuh Princesseuh merged commit 6884b10 into main Feb 14, 2024
14 checks passed
@Princesseuh Princesseuh deleted the feat/perf-audits branch February 14, 2024 13:01
@astrobot-houston astrobot-houston mentioned this pull request Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 action Modifies GitHub Actions pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants