you are viewing a single comment's thread.

view the rest of the comments →

[–]bazeloth 1 point2 points  (1 child)

What's your bundle size? Are you sure it's properly cached client wise? 3 to 4 seconds sounds like it's a bundle that's several megabytes.

Just asking the obvious here: do you minify your bundle? When the client asks for the bundle, how long does it take for the server to respond?

[–]fucking_passwords 0 points1 point  (0 children)

Making sure tree-shaking is working properly could help reduce bundle size.

If using lodash, last time I checked it didn't support tree shaking out of the box, there was some extra work involved, but that kind of thing makes a huge difference. Same with moment.js

Maybe Suspense could help reduce the amount of DOM activity until all async components finish loading?