top | item 43306500

(no title)

jonathanhefner | 11 months ago

I have also found that Next.js is shockingly slow.

I recently added some benchmarks to the TechEmpower Web Framework Benchmarks suite, and Next.js ranked near dead last, even for simple JSON API endpoint (i.e. no React SSR involved): https://www.techempower.com/benchmarks/#section=data-r23&hw=...

I discussed it with a couple of Next.js maintainers (https://github.com/vercel/next.js/discussions/75930), and they indicated that it's only a problem for "standalone" deployments (i.e. not on Vercel). However, I'm not entirely convinced that is true. I wonder if there are major optimizations that could be made to, for example, the routing system.

discuss

order

technion|11 months ago

I have no particular views on performance but the thing i keep hearing about next of 'this is solved by using one particular hosting provider' really surprises me as something people are ok with.

genewitch|11 months ago

kind of like the AWS tools only really work if you use them with Amazon Web Services...

gketuma|11 months ago

Going through the GitHub discussion is eye-opening given that CEO of Vercel just publicly stated that Next.js is an API framework: https://x.com/rauchg/status/1895599156724711665

csomar|11 months ago

Is he wrong though? Next.js reason of existence is essentially that .json file navigation. The addition of server side compute (ie: middlewares, router, etc...) is mostly a business decision that the framework has nothing to do with as it breaks your back-end/front-end separation (unless your application is very simple to fit in a nextjs function).

re-thc|11 months ago

> and they indicated that it's only a problem for "standalone" deployments (i.e. not on Vercel)

The fix is clearly to take out your wallet /not.

NextJs is slow. It doesn't have to be. For their swc, turborepo and everything else going on they could have made the actual production usage fast just as well.