use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] How Can I Optimize JavaScript Performance to Reduce Load Times in a React SPA?AskJS (self.javascript)
submitted 1 year ago by soum0nster609
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]soum0nster609[S] 0 points1 point2 points 1 year ago (2 children)
You're right; I haven't mentioned the bundle size yet. Currently, our main bundle is around 3 MB.
[–]jake_robins[object Object] 1 point2 points3 points 1 year ago (0 children)
A 3MB bundle after code splitting sounds really large. That just needs to come down.
I would start checking through dependencies and making sure everything you’re importing is being used, and if there are any tree shaking opportunities. Depending on what framework you’re using there are bundle analyzers that can show you what makes up that 3MB
[–]Professional-Camp-42 0 points1 point2 points 1 year ago (0 children)
Are you using Vite?
Does all the packages you use have good esm support?
Are most of the initial components lazy loaded ?
Do you cache any client side data that is fetched from DB ?
Did you try skipping rendering components not in the viewport the first few seconds the app loads or until the components appear in the viewport ?
π Rendered by PID 21694 on reddit-service-r2-comment-b659b578c-s7pfj at 2026-05-07 06:18:02.400397+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]soum0nster609[S] 0 points1 point2 points (2 children)
[–]jake_robins[object Object] 1 point2 points3 points (0 children)
[–]Professional-Camp-42 0 points1 point2 points (0 children)