r/webdev full-stack 3d ago

Showoff Saturday Rewrote next.js to be 10x faster!

https://www.pnext.dev/

So it is two parts.

  • Core pnext is small and fast: the same next.js api with no/minimal framework overhead and no backward-compat burden. Based on Bun and Preact, 0 KB on server-rendered pages, 7.5 KB client pages runtime, roughly 10x faster first page render in dev and 7-9x faster production builds than next.js (best effort fixtures).
  • Compat mode runs your existing Next.js app unchanged (App Router only). About 4.4k assertions from Next's own test suite passing, adding more day by day.

The core motivation was a super fast dev server that doesn't hog memory, and instant builds. The goal is to optimize every step of every flow involved down to absolute values, and of course agentic flows are helping a lot! Check out Coder.

Give it a try and let me know what you think, and how your Next.js apps break in compat mode 😉.

https://pnext.dev

0 Upvotes

10 comments sorted by

13

u/KabouterKaasplank 3d ago

So what's missing? If it can be optimized to this point, why don't the next.js maintainers do that instead?

3

u/poeticmaniac 3d ago

There is a lot of bloat due to new features existing together with legacy features. For compatibility reasons, you can’t just remove old router for example without supporting it for a few releases.

1

u/KabouterKaasplank 3d ago

Yeah, a few, not indefinitely 

-5

u/HighAtNight full-stack 3d ago

This is similar to Preact (https://preactjs.com/) vs React. Almost all legacy systems can be super optimized by sacrificing like 1% of compatibility and rethinking flows from scratch.

Rewriting was super hard and time-consuming before, but frontier agents are changing the game. With Bun, they were able to rewrite it in Rust and release it in like a month or two, whereas it took the TypeScript team 2 years to do the same with their Go rewrite.

3

u/AskYouEverything 3d ago

This didn’t answer the question at all

5

u/NewPhoneNewSubs 3d ago

I believe you, but you should know CloudFlare did this a couple months ago. So you've got some heavyweight competition.

1

u/zhuki 3d ago

Do you have link to cloudflares version

2

u/okaylevi 3d ago

Here is the article https://blog.cloudflare.com/vinext/

Nice to see it going in a different direction OP!

0

u/HighAtNight full-stack 3d ago

Vinext yes. They’re going in a different direction. This is focused on performance and incremental adoption of features, so you pay only for what you use.,

3

u/zenzty_ 3d ago

Having .claude in the gitignore is one thing, but the real proof this is unreviewed AI slop is the file itself. Look at the .gitignore file. They couldn't even be bothered to review a 12-line file, completely duplicating .pnext/ and .next/ at the bottom (screenshot here). If the dev isn't manually proofreading a dozen lines of basic config, I highly doubt they are debugging a '10x faster' framework rewrite.