kothariji / SyntaxMeets

Syntaxmeets. Create rooms 🏠 Call your friends πŸ‘¬πŸΌ Sip Chai, β˜• Chat, Create, and CodeπŸ‘¨β€πŸ’». A coding platform to code simultaneously πŸš€ with your friends and design your algorithms on SyntaxPad.πŸ’«βœ¨
https://syntaxmeets.vercel.app
MIT License
168 stars 59 forks source link

[Feat]: Adding Lazy Loading component for improving performance of application. #79

Closed WaderManasi closed 3 years ago

WaderManasi commented 3 years ago

Describe the solution you'd like

Are you willing to contribute to this issue? [Yes/No] Yes, being part of gssoc'21

Vishv07 commented 3 years ago

As of now, we have very few components, what I mean by that is we have the main panel is room. so anyway the moment the user step into the room, all components has to be loaded. so it's doable but I think it won't reduce the loading time as such.

Since vercel is very quick and our landing page isn't taking much time but still Lazy Loading can be done after all its your call @kothariji

kothariji commented 3 years ago

Hi @WaderManasi, First of all, thank you so much for taking out the time to create this issue.

Oh Yes, actually I analyzed the initial loading time of Sytaxmeets, and on the initial render, all the components are imported(this is the normal behavior, as we write import statements directly).

And this is affecting the performance of our application.

image

So for now we can use Lazy( ) in App.js for React-Routers so that SyntaxRooms is only called when someone joins the room.

So @Vishv07, I think we are good to go with the lazy import of big components, which will improve performance. What say @Vishv07 ?

Definitely πŸ™Œ, Please go forward to work on this issue. I am assigning this Issue to you πŸ‘

And last but not least, Keep Contributing πŸ™πŸ”₯

Vishv07 commented 3 years ago

@kothariji Yes, we can reduce the initial loading time. let @WaderManasi give it a shot and then we will compare it.

kothariji commented 3 years ago

Old Performance

image

New Performance

image

Great Work @WaderManasi πŸ™Œ

thank you so much for your contributions πŸ”₯

WaderManasi commented 3 years ago

Thank you πŸ™Œ!