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-154899 - Pilot preloading marquee dependencies #383

Closed
wants to merge 4 commits into from

Conversation

auniverseaway
Copy link
Member

  • Preload known marquee dependencies if in LCP section
  • Not in scope: MEP awareness

Resolves: MWPW-154899

Test URLs:

How to test:
Observe in the network calls that all marquee dependencies load before things that are historically in front of blocks: placeholders, etc.

Additional context:
This is a pilot to see if this feature should be elevated to Milo at a later date. I'm a little suspect this will add any performance gains in low bandwidth scenarios, but it's worth trying.

* Preload known marquee dependencies if in LCP section
* Not in scope: MEP awareness

Resolves: MWPW-154899
@auniverseaway auniverseaway requested a review from a team as a code owner August 6, 2024 16:45
Copy link

aem-code-sync bot commented Aug 6, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Aug 6, 2024

Copy link

@mokimo mokimo left a comment

Choose a reason for hiding this comment

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

Should we wait for @chrischrischris PR adobecom/milo#2686 in milo core first?

That way we might get more accurate data.

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

loadLink(`${miloLibs}/blocks/marquee/marquee.css`, { rel: 'stylesheet' });
loadLink(`${miloLibs}/blocks/marquee/marquee.js`, { as: 'script', rel: 'modulepreload' });
loadLink(`${miloLibs}/utils/decorate.js`, { as: 'script', rel: 'modulepreload' });
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@auniverseaway
The changes currently rely on the assumption that the default authoring of the first block on the page is marquee and it will always be marquee
In a case if there is a marquee on page with mep personalization that changes it to hero-marquee..
marquee js and css would get loaded
but then mep will change it
milo will run as usual and hero-marquee js and css will get loaded
So in this scenario extra call was made to a js or css that was not needed

Copy link
Member Author

Choose a reason for hiding this comment

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

The changes currently rely on the assumption that the default authoring of the first block on the page is marquee and it will always be marquee

This isn't quite accurate, but I think I know where you're going with your question. FWIW, this does not assume marquee is the first block on a page. Only that there is a marquee somewhere in the first section. If marquee is not in the first section, this does nothing and that is the intention.

In a case if there is a marquee on page with mep personalization that changes it to hero-marquee..
marquee js and css would get loaded
but then mep will change it
milo will run as usual and hero-marquee js and css will get loaded
So in this scenario extra call was made to a js or css that was not needed

Yes. This is expected. Hence, "pilot" and "out of scope: mep awareness" as by the time MEP fires, this would not provide any value. It's too late in the order of operations. The ideal use case is that MEP replaces a same block for same block, but with different content. This is not meant to cover all edge cases, just enough to collect some data to see if this improves performance.

Copy link

@mokimo mokimo Aug 30, 2024

Choose a reason for hiding this comment

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

@aishwaryamathuria we want to trial this as part of the performance tiger team, we are closely observing the numbers and want to see if this has any positive benefit.

As Chris mentioned, if this assumption (marquee in the first section) is not true, there isn't a lot of harm. Would be awesome if we could take it forward, if the concept works on CC we might want to adopt it more broadly in milo-core.

if its doing nothing, we can remove the code again.

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

7 similar comments
@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@mokimo
Copy link

mokimo commented Aug 15, 2024

I'd recommend

  1. Enable logging web vitals on a page MWPW-154969 Log LCP and key user attributes milo#2686
  2. Wait for a bit of data for a day
  3. Merge this PR and share any changes in numbers

@salonijain3 can someone take care of this?

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

3 similar comments
@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@spadmasa spadmasa removed their assignment Aug 20, 2024
@mokimo
Copy link

mokimo commented Aug 20, 2024

@sharath-kannan can you look at improving the message logic? It's a little spammy if the PRs don't get merged

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to failing checks

@sharath-kannan
Copy link
Contributor

@sharath-kannan can you look at improving the message logic? It's a little spammy if the PRs don't get merged

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

Sure, i will check this.

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to failing checks

2 similar comments
@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to failing checks

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to failing checks

@auniverseaway
Copy link
Member Author

@mokimo @salonijain3 is there anything needed from me on this? The lana tracking PR has been merged. Would you like me to assign someone to verify this?

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

1 similar comment
@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@mokimo
Copy link

mokimo commented Aug 28, 2024

I don't know much about the cc contribution process. @salonijain3 can you help getting this verified and merged? The goal are some performance improvements we'd want to trial on cc.

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

2 similar comments
@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@milo-pr-merge-cc
Copy link

Skipped merging 383: MWPW-154899 - Pilot preloading marquee dependencies due to missing verified label. kindly make sure that the PR has been verified

@mokimo
Copy link

mokimo commented Sep 3, 2024

Given the concerns from @aishwaryamathuria this is currently not in a state to be merged. @Ruchika4 would you want to give this a spin? I'll close this for now given there's no path forward.

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

6 participants