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

♻️ App Router migration - Homepage #3159

Closed
1 task done
jeoffreyfischer opened this issue Sep 25, 2024 · 11 comments · Fixed by #3170, #3196 or #3198
Closed
1 task done

♻️ App Router migration - Homepage #3159

jeoffreyfischer opened this issue Sep 25, 2024 · 11 comments · Fixed by #3170, #3196 or #3198
Assignees

Comments

@jeoffreyfischer
Copy link
Member

jeoffreyfischer commented Sep 25, 2024

Description
Currently our Website is using Page Router. This results in a huge bundle size which results in a slower UX on the website.

Tasks

  • Migrate Homepage from Page Router to App Router
@amankumarrr
Copy link
Member

amankumarrr commented Oct 2, 2024

🚧In progress:

✅ Home page is served from App Routing
✅ Improved Cumulative Layout and Largest Content Paint
✅ Cleaned up the unnecessary divs for the mobile view
✅ Reduced Total blocking time by almost half from 3000ms+ to 1600ms
✅ Page score went up for desktop 📈90+ from 70+

Screenshot:
image
Figure: PageSpeedInsight report

@amankumarrr
Copy link
Member

amankumarrr commented Oct 2, 2024

Remaining tasks:

  • Testing for UG
  • Making Upcoming events static to improve SEO and to reduce the bundle size

@amankumarrr
Copy link
Member

Created a separate issue for the remaining tasks - #3186

@amankumarrr
Copy link
Member

Image
Figure: Before - App Routing migration

@amankumarrr
Copy link
Member

Image
Figure: Figure: Before - App Routing migration

@amankumarrr
Copy link
Member

Image
Figure: Figure: Before - App Routing migration

@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in SSW.Website Oct 8, 2024
@amankumarrr
Copy link
Member

@bradystroud @wicksipedia

After merging the PR, I discovered an issue with cumulative layout shift (CLS), leading to poor performance on desktop. I'm currently investigating the cause.

Image
Figure: After - App routing migration

@amankumarrr amankumarrr reopened this Oct 8, 2024
@github-project-automation github-project-automation bot moved this from ✅ Done to 🏗 In progress in SSW.Website Oct 8, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in SSW.Website Oct 8, 2024
@amankumarrr
Copy link
Member

@wicksipedia @bradystroud @Calinator444 @jeoffreyfischer

The performance on production has not improved but has actually deteriorated. The app service slot shows the same performance; however, when the traffic is routed through Cloudflare, it introduces delays and cumulative layout shifts. I tested the build locally with throttling (4G slow), and it works fine. The issue only appears when served via Cloudflare.

I suspect this could be due to the Brotli compression used by default on Cloudflare, whereas Next.js already returns compressed Gzip for the HTML. I will investigate this further to find the root cause and resolve the issue.

@amankumarrr
Copy link
Member

Directly through the app service's production slot.

Image

@amankumarrr
Copy link
Member

@wicksipedia @bradystroud @Calinator444 @jeoffreyfischer

I've discovered that the Carousel is being loaded twice, but this only happens when served through Cloudflare. I've been attempting to reproduce the issue locally using Nginx, but the occurrence is significantly lower compared to Cloudflare. Based on the screenshot, it appears the client is making a second call for the Carousel images.

I'll continue investigating to understand why this behavior is unique to Cloudflare and determine how to prevent these duplicate requests.

Image
Figure: On production, the carousel image is being loaded twice

@amankumarrr amankumarrr reopened this Oct 8, 2024
@github-project-automation github-project-automation bot moved this from ✅ Done to 🏗 In progress in SSW.Website Oct 8, 2024
@amankumarrr amankumarrr linked a pull request Oct 9, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in SSW.Website Oct 9, 2024
@amankumarrr
Copy link
Member

✅fixed the issue with cumulative layout shift.

Before
Image

After
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
2 participants