Readit News logoReadit News
raydenvm · 3 days ago
Yeah, it makes you wonder how much computing power the industry has wasted over the years on tools that nobody questioned because "that's just how long builds take." We planned our work around it, joked about creating breaks, and built entire caching layers to work around it.

Kudos to the Vite maintainers!

semiquaver · 2 days ago
The waste of slow JS bundles is nothing compared to the cost of bloated interpreted runtimes or inefficient abstractions. Most production software is multiple orders of magnitude slower than it needs to be. Just look at all the electron apps that use multiple GB of ram doing nothing and are laggier than similar software written 40 years ago despite having access to an incredibly luxurious amount of resources from any sane historical perspective.
shimman · 2 days ago
Something I realized while doing more political campaign work is how inefficient most self hosted solutions are. Things like plausible or umami (analytics) require at least 2 gigs of ram, postiz (scheduled social media planner) requires 2 gigs of ram, etc.

It all slowly adds up where you think a simple $10 VPS with 2 gigs of ram is enough but it's not, especially if you want a team of 10-30ish to work sporadically within the same box.

There can be a lot of major wins by rewriting these programs in more efficient languages like Go or Rust. It would make self hosting more maintainable and break away from the consulting class that often has worse solutions at way higher prices (for an example, one consulting group sells software similar to postiz but for $2k/month).

awongh · 2 days ago
I guess there's the distinction between capacity that could be taken up by other things, and free capacity that doesn't necessarily cost anything.

For a server built in the cloud those cycles could actually be taken up by other things, freeing the system and bringing costs down.

For a client computer running electron, as long as the user doesn't have so many electro apps open that their computer slows down noticeably, that inefficency might not matter that much.

Another aspect is that the devices get cheaper and faster so today's slow electron app might run fine on a system that is a few years away, and that capacity was never going to be taken up by anything else on the end user's device.

jjtheblunt · 2 days ago
> Most production software is multiple orders of magnitude slower than it needs to be.

at least 100x slower than it needs to be?

Deleted Comment

blackoil · 2 days ago
Why are electron apps memory intensive compared to other cross platform frameworks. Is it language, UI system or legacy?
spiderfarmer · 2 days ago
Imagine the amount of useful apps that would not have been made without Electron.
KronisLV · 2 days ago
> Yeah, it makes you wonder how much computing power the industry has wasted over the years on tools that nobody questioned because "that's just how long builds take."

I feel the same way about tools like ESLint and Prettier as well after discovering Oxc https://oxc.rs/

Zopieux · 3 days ago
I wonder what will be the parallel hindsight about waste, but for matrix multiplications, in a few years.
_heimdall · 3 days ago
By then I understand that matrix multiplication will have cured cancer and invented unlimited free energy, so no hindsight of waste needed.
xxpor · 2 days ago
The economic incentives line up much better there. You charge for tokens -> cost is GPUs -> you work very hard to keep GPUs utilized 100% and get max tokens out of those cycles.

Compare this to essentially any modern business app, the product being sold has very little relationship with CPU cycles, or the CPU cycles are SO cheap relative to what you're getting paid, no one cares to optimize.

jillesvangurp · 3 days ago
Build performance has been a pet topic for me for quite some time when I realized I was wasting so much times waiting for stuff to build 14 years ago. The problem is especially endemic in the Java world. But also in the backend world in general. I've seen people do integration tests where 99% of the time is spend creating and recreating the same database over and over again (some shitty ruby project more than a decade ago). That took something like 10 minutes.

With Kotlin/Spring Boot, compilation is annoyingly slow. That's what you get with modern languages and rich syntax. Apparently the Rust compiler isn't a speed daemon either. But tests are something that's under your control. Unit tests should be done in seconds/milliseconds. Integration tests are where you can make huge gains if you are a bit smart.

Most integration tests are not thread safe and make assumptions about running against an empty database. Which if you think about it, is exactly how no user except your first user will ever use your system.

The fix for this is 1) allow no cleanup between tests 2) randomize data so there are no test collisions between tests and 3) use multiple threads/processes to run your tests to 1 database that is provisioned before the tests and deleted after all tests.

I have a fast mac book pro that runs our hundreds of spring integration tests (proper end to end API tests with redis, db, elasticsearch and no fakes/stubs) in under 40 seconds. It kind of doubles as a robustness and performance test. It's fast enough that I have codex just trigger that on principle after every change it makes.

There's a bit more to it of course (e.g. polling rather than sleeping for assertions, using timeouts on things that are eventually happening, etc.). But once you have set this up once, you'll never want to deal with sequentially running integration tests again. Having to run those over and over again just sucks the joy out of life.

And with agentic coding tools having fast feedback loops is more critical than ever.

Sammi · 2 days ago
> I've seen people do integration tests where 99% of the time is spend creating and recreating the same database over and over again (some shitty ruby project more than a decade ago). That took something like 10 minutes.

For anyone that doesn't know: With sqlite you can serialize the db to a buffer and create a "new" db from that buffer with just `new Datebase()`. Just run the migrations once on test initialization, serialize that migrated db and reuse it instantly for each test for amazing test isolation.

panstromek · 2 days ago
> Most integration tests are not thread safe and make assumptions about running against an empty database. Which if you think about it, is exactly how no user except your first user will ever use your system.

Yea, cypress has this in their anti-patterns:

https://docs.cypress.io/app/core-concepts/best-practices#Usi...

Dangling state is useful for debugging when the test fails, you don't want to clean that up.

This has been super useful practice in my experience. I really like to be able to run tests regardless of my application state. It's faster and over time it helps you hit and fixup various issues that you only encounter after you fill the database with enough data.

esafak · 2 days ago
Kotlin compiles fast; I don't have any problems with ktor. Spring Boot and Rust do not.
flohofwoe · 2 days ago
No worries, projects will soon catch up by throwing more code at the build system.

Dead Comment

homebrewer · 3 days ago
Very pleased to see such performance improvements in the era of Electron shit and general contempt for users' computers. One of the projects I'm working on has been going for many years (since before React hooks were introduced), and I remember building it back in the day with tooling that was considered standard at the time (vanilla react-scripts, assembled around Webpack). It look maybe two minutes on a decent developer desktop, and old slow CI servers were even worse. Now Vite 8 builds it in about a second on comparable hardware. Another demonstration of how much resources we're collectively wasting.
this_user · 3 days ago
> Very pleased to see such performance improvements in the era of Electron shit and general contempt for users' computers.

Luckily, we have invented a completely new nightmare in the form of trying to graft machine-usable interfaces on top of AI models that were specifically designed to be used by humans.

Deleted Comment

itsTyrion · 2 days ago
the vite Homepage lags on both an A55 and s23fe regardless, which bears at least some irony
vbezhenar · 3 days ago
It is especially weird because JavaScript was not supposed to be processed at all! This is all wrong if you ask me. Web development should strive to launch unchanged sources in the browser. TypeScript also was specifically designed so engine could strip types and execute result code. These build tools should not exist in the first place.
__alexs · 3 days ago
JavaScript was not supposed to a lot of things.
olmo23 · 3 days ago
If you're already passing over the sources to strip the types, why would you also not do tree-shaking and minifications?
azangru · 2 days ago
> TypeScript also was specifically designed so engine could strip types and execute result code. These build tools should not exist in the first place.

Was it? Have you forgotten namespaces and enums?

tshaddox · 2 days ago
> TypeScript also was specifically designed so engine could strip types and execute result code.

That's no less a build step than concating, bundling, minifying, etc. When people say "I'm against processing code before deploying it to a web site" but then also say "TypeScript is okay though" or "JSX is okay though," all they're really saying is "I like some build steps but not others." Which is fine! Just say that!

mexicocitinluez · 2 days ago
> It is especially weird because JavaScript was not supposed to be processed at all! This is all wrong if you ask me.

You're not actually suggesting that technology can't evolve are you? Especially one whose original design goals were to process basic forms and are now being used to build full-blown apps?

It's absolutely wild to me that with everything that has happened in the last 2 decades with regard to the web there are still people who refuse to accept that it's changed. We are building far bigger and more complex applications with JavaScript. What would you propose instead?

Dead Comment

johnfn · 3 days ago
Vite 8 is pretty incredible. We saw around an 8x improvement (4m -> 30s) in our prod build, and it was nearly a drop-in replacement. Congrats (and thank you!) to the Vite team!
FrostKiwi · 3 days ago
Same here (10s to 1s). The main reason for this is rolldown [1]. Already had it installed months ago, before it got merged into vite proper. Really awesome stuff.

[1] https://rolldown.rs/

Griffinsauce · 3 days ago
4 minutes?! How large is that app?

Not meant as a gotcha but I'm surprised because people always tout it as being so much faster than Next. (4m with Turbo would have to be a crazy huge app IME)

rk06 · 3 days ago
most likely they are not running the prod build on latest mac. so it is slower.
dschu · 3 days ago
Yeah, 4 mins is currently the avg. build time for our TanStack app dockerized. The turbo part takes 30 sec with Vite 7
bengale · 3 days ago
We saw 12m -> 2m on one of our biggest projects. Incredible really.
christophilus · 3 days ago
It blows my mind that there is a 12m build for a JavaScript application. How may lines of code is this app?
upsuper · 2 days ago
I contributed this change in Vite 8:

> Wasm SSR support: .wasm?init imports now work in SSR environments, expanding Vite's WebAssembly feature to server-side rendering.

While the process was relatively slow, I really appreciate the extra effort that the team have put on even this minor feature add. They not only guided me towards more compatible and idiomatic approach, but also added docs and helped keeping the code up to date before merging.

bovermyer · 2 days ago
This is a fun insight, thank you for sharing that!

I like Vite as a tool, but knowing that the Vite folks actually care about helping others learn and contribute is awesome.

moretti · 3 days ago
Thanks to the Vite team for building a faster, modern bundling solution on a fully open source stack that isn't tied to a specific framework...cough cough, Turbopack
soulchild77 · 3 days ago
Awesome! Too bad Next.js will never profit from these incredible community efforts, because Vercel suffers from NIH.
gherkinnn · 3 days ago
It's the Vercel way to first run broken previews for several years.

Next started with Turbopack alpha as a Webpack alternative in Next 13 (October 2022) and finally marked Turbopack as stable and default in Next 16 (October 2025). They also ran sketchy benchmarks against Vite back in 2022 [0].

Next's caching has a terrible history [1], it is demonstrably slow [2] (HN discussion [3]), RSCs had glaring security holes [4], the app router continues to confuse and relied on preview tech for years, and hosting Next outside of Vercel requires a special adapter [5].

Choosing Next.js is a liability.

0 - https://github.com/yyx990803/vite-vs-next-turbo-hmr/discussi...

1 - https://nextjs.org/blog/our-journey-with-caching

2 - https://martijnhols.nl/blog/how-much-traffic-can-a-pre-rende...

3 - https://news.ycombinator.com/item?id=43277148

4 - https://nextjs.org/blog/CVE-2025-66478

5 - https://opennext.js.org/

ssijak · 3 days ago
Next took a very bad turn and double downed on it. Coupled with years of terrible bugs its beyond repair for me unless they rewind a bunch of core changes they did.

There are several much better options right now. My favourite is Tanstack Start. No magice, great DX

littlecranky67 · 3 days ago
Any suggestions to replace NextJS when you only use static export (no SSR)?
CalRobert · 3 days ago
Got back in to react after a few years’ hiatus and I struggle to even understand what the point of Next is. Bizarrely the official docs even reference Next. Are people using react for non-SPA’s? Why?
flowerbreeze · 3 days ago
I'm being rather snarky here, but the main point of front-end JS UI frameworks is to exist and to survive in their environment. For this purpose they have evolved to form a parasymbiotic relationship with others in their environment, for example with influencers. The frameworks with the best influencers win out over older ones that do not have the novelty value anymore and fail to attract the best influencers.
drawfloat · 3 days ago
Vercel has slowly taken over Facebook's position as being the employer of the main developers of React. There's a debate to be had over how much they 'control' it or not, but the fact create-next-app is the first recommended option on the official installation page now does show it's had an impact.

5 or so years ago, Next was a pretty solid option to quickly build up a non SPA, when combined with the static export function. It wasn't ideal, but it worked and came batteries included. Over time it's become more bloated, more complicated, and focused on features that benefit from Vercel's hosting – and static builds can't take advantage of them.

These newer features seem of limited benefit, to me, for even SPAs. Why is there still not a first class way of referencing API routes in the client code that provides typing? Once you reach even medium scale, it becomes a mess of inteprolated string paths and manually added shared response types.

codetantra · 3 days ago
After Tanstack Start, Next.js seems even less intuitive. While it remains a viable option due to its established momentum, it feels quite alien to backend devs, esp with its unconventional defaults.
gnarlbar · 3 days ago
Not me, but I can imagine it happening.

JSX is a nice server side templating language. There a lot of people who aren't dependency conscious, and a lot of people who love react, and there is quite a bit of overlap in those two groups. I've used bun + preact_render_to_string for server side JSX templates before and it was nice. When I did it seemed that bun somewhat embraced react, and I could imagine react being the path of least resistance to server-side JSX there for some of the folks in the aforementioned groups.

user34283 · 2 days ago
Instead of going:

Fetch index.html -> Fetch JS bundle -> Evaluate -> Fetch /users/me

You do:

Fetch index.html (your page is rendered at this point) -> rehydrate with client side JS for interactivity in the background

It's a pretty smart solution I think, and many people are still sleeping on the whole SSR topic.

azangru · 2 days ago
> Are people using react for non-SPA’s?

Imagine a page that loads html during the first load, and then performs client-side routing during subsequent navigations. Is it an SPA? Is it not an SPA?

pjmlp · 3 days ago
The point is JavaScript developers rediscovering PHP, Spring MVC, ASP.NET MVC, Rails,.....

And to sell Vercel on top.

pjmlp · 3 days ago
They have the enterprise partners that make Next.js the only officially supported SDK on their SaaS integrations.

See Sitecore Cloud, Sanity, Contentful,....

rk06 · 3 days ago
Really the enterprise partner supports next, but not vanilla js sounds stupid? Honestly I expect them to prioritize nextjs and react given the popularity, but still be open to vanilla js.

I checked sitecore cloud to have special integration for nextjs and reactjs. But it also support vanilla js as well.

Are there really anyone who is exclusive to nextjs?

rk06 · 2 days ago
Vercel owns nuxt and sveltekit, so they do benefit. only nextjs suffers from not being on vite.
rvcdbn · 3 days ago
maybe of interest: https://github.com/cloudflare/vinext

(haven't tried it myself)

vijaybritto · 3 days ago
It's not a good piece of software. Breaks in many places
karel-3d · 3 days ago
Yesterday I stopped hating AI because it converted an old webpack project with impenetrable plugin settings to a single simple Vite config.

I still don't understand how people used to think scripts like this are the proper way to bundle an app.

https://github.com/facebook/create-react-app/blob/main/packa...

vite is great, is all I am saying

jjice · 2 days ago
800 lines config to compile code that's later interpreted is wild. I get the general idea behind having a script instead of a static config, so you can do some runtime config (whether or not we should have runtime changes to config is a different conversation), but this is absurd.

I'm a big believer in fully reviewing all LLM generated code, but if I had to generate and review a webpack config like this, my eyes would gloss over...

karel-3d · 2 days ago
No no no, the script on the link was BEFORE llms. That was how it used to be done before. That was the recommended facebook way.

The LLM generated vite config is 20 lines

ricardobeat · 20 hours ago
People fought to replace the tools of the era with this. It had some advantages over time - ES6, a good plugin ecosystem, react adoption - but quickly it just became "the standard" which everyone is afraid to question.

I used to maintain a build workflow library [1] a lifetime ago; while our frontend build needs have evolved way beyond it, I can't avoid the feeling that we overengineered a little too much.

[1] https://github.com/ricardobeat/cake-flour

brillout · 2 days ago
Vite+, Void Cloud, Void Framework... an epic battle between Vercel and Void is coming.

The PRC (aka server functions) demo [0] is particularly interesting — end-to-end type safety (from DB to UI) is a major milestone for JavaScript. We've been doing a lot of RPC design work in that space with Telefunc (tRPC alternative) [1] — it's a really hard topic, and we're looking forward to collaborating with the Void team. (Also looking forward to contributing as the creators of Vike [2].)

[0]: https://www.youtube.com/watch?v=BX0Xv73kXNk (around the end of the first talk) [1]: https://telefunc.com (see the last PR) [2]: https://vike.dev

yurishimo · 2 days ago
You say that, but isn't Vercel also a Void(0) investor in a roundabout way?

The big news regarding Void Cloud is that it all seems to be built on Cloudflare workers. The landing page is very light on info atm too. [0]

I am super excited that they are MIT open sourcing Vite+ however. In that realm, they are obviously targeting Bun as their main competition. Unfortunately for Bun, if they are forced to help Anthropic more than they can focus on OSS, they might lose their current (perceived?) advantage.

0: https://void.cloud/

brillout · 2 days ago
Doesn't seem like it — see VoidZero investors [0].

> Unfortunately for Bun, if they are forced to help Anthropic more than they can focus on OSS

Curious: is that speculation, or based on observation?

[0]: https://voidzero.dev/about