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

Optimizing /people route #421

Closed
Re-Dei opened this issue Apr 3, 2024 · 7 comments · Fixed by #423
Closed

Optimizing /people route #421

Re-Dei opened this issue Apr 3, 2024 · 7 comments · Fixed by #423

Comments

@Re-Dei
Copy link
Contributor

Re-Dei commented Apr 3, 2024

The /people route has become slow because of the new hover feature. Since hover feature is only required when hovered, implement a dynamic import strategy to solve this issue.
Docs: https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading

@Re-Dei
Copy link
Contributor Author

Re-Dei commented Apr 3, 2024

I am busy for 2 weeks and will only be available to solve this issue after these 2 weeks. So anyone who is willing to solve this issue in these 2 weeks are welcome.

@rash-27
Copy link
Contributor

rash-27 commented Apr 3, 2024

  • before using dynamic import
    image
  • after using dynamic import
    Screenshot from 2024-04-03 19-48-11
    and the after using dynamic import we are getting more size than the current one

@Re-Dei
Copy link
Contributor Author

Re-Dei commented Apr 6, 2024

@rash-27 i think you forgot to put the condition when to dynamically import

@Re-Dei
Copy link
Contributor Author

Re-Dei commented Apr 6, 2024

@rithviknishad sorry for making a PR before getting assigned. Just happened to get some free time today.

@rash-27
Copy link
Contributor

rash-27 commented Apr 6, 2024

@Re-Dei what I thought is that currently we are rendering '/people' on the server side and showing cards using tailwind (using opacity so that we are fetching them while rendering on the server) ,and converting that to a client side component may take away the advantages of the SSR right ?

@Re-Dei
Copy link
Contributor Author

Re-Dei commented Apr 6, 2024

@rash-27 only the hover card is being rendered client side in my PR. You can see to learn more.

@rash-27
Copy link
Contributor

rash-27 commented Apr 6, 2024

Sure , I'll look into it .

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 a pull request may close this issue.

2 participants