generated from adobecom/milo-college
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Performance improvements #102
Open
mokimo
wants to merge
7
commits into
stage
Choose a base branch
from
perf-improvements
base: stage
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MWPW-156696 | Fixing the render issue Before: https://main--unity--adobecom.hlx.page/unity/unitypages/test-and-demo?georouting=off&martech=off After: https://imagerender--unity--adobecom.hlx.page/unity/unitypages/test-and-demo?georouting=off&martech=off Test url: https://stage--cc--adobecom.hlx.page/products/photoshop/remove-background?unitylibs=imagerender
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
mokimo
requested review from
amitbikram,
sanjayms01,
aishwaryamathuria and
Ruchika4
and removed request for
amitbikram and
sanjayms01
August 21, 2024 09:56
sanjayms01
force-pushed
the
stage
branch
3 times, most recently
from
October 30, 2024 20:28
3a0e2c8
to
20711cc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are a few discussions about preloading, as well as after this initial research, I'll open a discussion based on the advantages of parallelizing loading.
As project unity will only display POST-LCP, we can parallelize as much as the browser allows us to do, as we will need the assets anyway. I tried to keep this PR "unintrusive" by not changing any order of JS operations and simply moving a few imports and loading actions around.
Observable improvements:
I've used local overwrites to test this on the prod pages behind akamai:
Prod before, desktop: 1.73s
Prod after, desktop: 1.31s
Prod before, fast 4G (mobile): 3.34s
Prod after, fast 4G (mobile) 2.13s
There is a bit of jitter within this data, but there should be general improvements. I'd love to see us observing the improvements using CRUM and collect valuable data about this use-case. Numbers tested locally are usually optimistic (e.g. 1.73s or 1.31s both sound too good for desktop) - so I'd love to follow those numbers.
Future enhancement suggestions
The general aim here is, we want to show the marquee (or any) image as fast as we can. Everything that is not part of the LCP block // image can be delayed. The user will not instantly click the buttons within the marquee and even if an event listener to detect the click and loading the rest of the logic is good enough (gnav does that)
Deep dive into what changed
Let’s establish the baseline, we queue a lot of imports. Each import // load needs to
(a)wait
for the response to be returned:1 - We can combine loading styles & workflow:
2 - Move loading product workflow together with the base workflow
3 - Require workflow step assets (upload-bin, app-connector) earlier within the product workflow, to start loading them whenever the product workflow has been loaded
4 - Loading all assets (svgs) concurrently and re-use them. IMO We can be even smarter here in the future by only loading the SVGs that are initially visible, we might end up loading too much. But this PR should serve as a good inspiration and good first batch of improvements.
Test URLs: