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

MWPW-158071: Optimize LCP loading times #2882

Closed
wants to merge 6 commits into from

Conversation

mokimo
Copy link
Contributor

@mokimo mokimo commented Sep 16, 2024

Description

It's relatively hard to track performance beforehand, however we observed a +500MS (13%) gain on CC pages speeding up loading placeholders. We've also seen good success with preloading as noted in this discussion

Decorate.js

This PR initially introduced the idea of preloading decorate.js for a performance gain, but introduced too much flexibility. The idea of preloading decorate.js for specifically the two common (hero-)marquees blocks is valuable and worth the added 3 lines of code, as neither is likely to change anytime soon.

Impressions

This should provide good benefits on a wide arrange of blocks, consumers and pages by optimizing the load order and chains, however we will want to observe the CRUM/RUM/CRUX data after merging the changes in this PR
homepage-before
homepage-after

Resolves: MWPW-158071

Test URLs:

@mokimo mokimo requested a review from a team as a code owner September 16, 2024 15:23
Copy link
Contributor

aem-code-sync bot commented Sep 16, 2024

Page Scores Audits Google
📱 /?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 82.75862% with 10 lines in your changes missing coverage. Please review.

Project coverage is 96.21%. Comparing base (cb05c67) to head (7205d99).
Report is 16 commits behind head on stage.

Files with missing lines Patch % Lines
libs/utils/utils.js 82.75% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #2882      +/-   ##
==========================================
- Coverage   96.24%   96.21%   -0.03%     
==========================================
  Files         238      237       -1     
  Lines       54316    54261      -55     
==========================================
- Hits        52277    52209      -68     
- Misses       2039     2052      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mokimo
Copy link
Contributor Author

mokimo commented Sep 16, 2024

Rightfully failing nala tests, I'll have to look at them and change the loading order for the placeholders a bit...

Copy link
Contributor

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

@mokimo
Copy link
Contributor Author

mokimo commented Sep 19, 2024

I'll open a follow up.

@mokimo mokimo closed this Sep 19, 2024
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.

1 participant