p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Implement Route Based Code Splitting

Open siddhant1 opened this issue 6 years ago • 7 comments

I think we should implement route based code splitting ,this will be easy to implement but will serve great improvements for the performance of the app.

Links :- https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4 https://reactjs.org/docs/code-splitting.html https://github.com/jamiebuilds/react-loadable https://medium.com/airbnb-engineering/server-rendering-code-splitting-and-lazy-loading-with-react-router-v4-bfe596a6af70

siddhant1 avatar Mar 02 '19 11:03 siddhant1

I can work on it while working on #857

siddhant1 avatar Mar 02 '19 11:03 siddhant1

hopefully this would have a meaningful impact on the site loading—given that the web editor is mostly the code editor/preview window, i wonder if this would make a significant impact. it's worth investigating!

catarak avatar Mar 04 '19 17:03 catarak

If the user is only there for the editor , we can save some valuable loading times by not downloading login page and examples page JavaScript

siddhant1 avatar Mar 04 '19 17:03 siddhant1

yeah, i think it is worth investigating! it's hard to know whether or not this improvement would be small or significant. i wonder if there's a way to do some incremental tests so all of this work doesn't happen for a small improvement.

catarak avatar Mar 04 '19 17:03 catarak

Using React Router (likely depends on #857): https://reactrouter.com/web/guides/code-splitting

catarak avatar Feb 10 '21 17:02 catarak

@catarak @kjhollen are we still up for this? as new react-router-dom v6 has been out lately!

vivekbopaliya avatar Dec 25 '23 15:12 vivekbopaliya

@catarak Can you please assign this to me.

SushantBansal-tech avatar Mar 09 '25 18:03 SushantBansal-tech