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

Improving the performance of the homepage by reducing the domsize #2168

Open
wants to merge 8 commits into
base: testing
Choose a base branch
from

Conversation

0XYoussefX0
Copy link

@0XYoussefX0 0XYoussefX0 commented Jun 10, 2024

Summary

the surah grid has a lot of dom nodes, which makes the dom tree bloated and makes recalculating styles slower also when the user visits the home page the whole grid needs to be rendered before the user sees anything on the page, which is not ideal since the grid is usually below the fold, so I thought of virtualizing the grid. After doing so, I've noticed a ~25% reduction in the time spent in scripting, and a ~43% reduction in the time spent rendering which improved almost all of the core web vitals metrics especially the time to interactive.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Test plan

I have tested this PR manually by interacting with the website, I haven't seen any bugs.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots or videos

Before After
Before After

Copy link

vercel bot commented Jun 10, 2024

@0XYoussefX0 is attempting to deploy a commit to the Quran Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jun 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
quran-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2024 11:35am

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