News for hackers. Stuff that matters.
Re:Farm: Fast vite compatible build tool written in Rust by 9dev on Saturday June 22, 2024 @10:28AM (#40759374)
So, I decided to try this for a real-world project and compare the results. This is for a full production build with no cache, taking the best of three runs each.

Vite:

    2166 modules transformed.
    built in 28.21s
Farm:

    [ Farm ] Build completed in 13350ms FULL EXTREME! Resources emitted to ./dist.
    [ Farm ] Public directory resources copied successfully.
So that is 28.21s vs. 13.35s, or a 53% decrease in build times. This is certainly neat, but I'm not sure whether it is worth the dependency on a new player.
Re:Farm: Fast vite compatible build tool written in Rust by threecheese on Saturday June 22, 2024 @02:02PM (#40760862)
A halving of build time, for even a medium volume project, could be a big cost reduction. If those builds were much longer than 30sec, compounding through a CI pipeline with many changes, leads to much shorter cycle times, faster time to prod, faster to find and fix defects, which translates to much more than just infra cost reduction benefits. I created a visualization once, of the release pipeline for a big project, showing the feedback loops that exist and the compounding effects of small improvements like that. It was eye opening for me, and everybody.
Re:Farm: Fast vite compatible build tool written in Rust by kamikaz1k on Saturday June 22, 2024 @02:12PM (#40760945)
Build time isn’t the only benefit, but consider that the author is from ByteDance and how large their projects are.

Another important callout is how in Vite, native ESM modules are used in dev which makes it very slow for large apps with thousands of modules. So cold start of dev can be important too.

In practice HMR is mostly what you need and Vite has it covered. But slow tends to accumulate slow.

Re:Farm: Fast vite compatible build tool written in Rust by c-hendricks on Saturday June 22, 2024 @06:20PM (#40762731)
I kinda prefer how vite handles things in dev by not bundling files. I work remote to my server, and I'd much rather download the few changed files vs a multi-deca-megabyte file.
Re:Farm: Fast vite compatible build tool written in Rust by tipiirai on Saturday June 22, 2024 @11:06PM (#40764431)
How can a project have 2166 modules? Sounds more like a problem in software architecture than in tooling.
Re:Farm: Fast vite compatible build tool written in Rust by 9dev on Sunday June 23, 2024 @03:16AM (#40765384)
Don’t know what to tell you. This is an actual web application that has seen four years of development, a migration from vanilla Vue.js 2, to Nuxt, then an integration of Vuetify 2 (which is about the worst library I have ever had the misfortune of working with, and has a giant amount of runtime dependencies).

I wouldn’t say it’s too many modules. We heavily use code splitting, so most of the time, users will fetch only a few of these, and pages load quickly. Plus, there’s some dependencies we cannot get rid of that are quite heavy.

From my personal experience though, it’s nothing unusual really.

Re:Farm: Fast vite compatible build tool written in Rust by ErikBjare on Sunday June 23, 2024 @06:44AM (#40766420)
I'm happy I never did that planned Vuetify rewrite of my Vue 2 app, dodged a bullet there.
Re:Farm: Fast vite compatible build tool written in Rust by 9dev on Monday June 24, 2024 @08:28AM (#40775223)
Sure did. We're completely locked in because Vuetify encourages you to use their components for everything from layouts to buttons, their styles are written in sass and depend on an outdated version of dart-sass, and use a half-assed version of Tailwind utility classes that creates conflicts on every level. And since they rewrote the framework completely for Vue 3, and took special care to make sure that every single darn prop is different, a migration is pretty much impossible without touching absolutely everything.

The only way out for us will be to get rid of vuetify components, one at a time, and introduce Tailwind with a prefix, until we can finally remove that mess.

The biggest recommendation I have is to stay away as far as you can from that library. I think that has been the worst technical decision I ever made at my job.

Re:Farm: Fast vite compatible build tool written in Rust by klabb3 on Sunday June 23, 2024 @07:14AM (#40766543)
Do you have an idea of what kind of functionality all of those deps provide? It would be interesting to see a breakdown of where dep bloat typically comes from.
Re:Farm: Fast vite compatible build tool written in Rust by 9dev on Monday June 24, 2024 @03:07AM (#40773224)
Yes, I just cannot share the flame graph publicly, but I can describe parts of it. A big chunk is taken up by the Mapbox GL SDK (Vector maps, 35%), Sentry (Telemetry and monitoring, 14%), and Vuetify (component framework, 10%). The rest are small dependencies and application code.
Re:Farm: Fast vite compatible build tool written in Rust by lloydatkinson on Monday June 24, 2024 @02:41AM (#40773099)
> Vue.js 2, to Nuxt, then an integration of Vuetify 2 (which is about the worst library I have ever had the misfortune of working with, and has a giant amount of runtime dependencies).

This is my experience with Vue overall, not just it's shitty ecosystem and libraries.

Re:Farm: Fast vite compatible build tool written in Rust by throwAGIway on Sunday June 23, 2024 @03:32AM (#40765440)
Heh... I'm just helping out on a TS project with 50k files/modules (over 1.5M lines), not counting the 200+ external dependencies (or their subdependencies).
Re:Farm: Fast vite compatible build tool written in Rust by sim0n on Sunday June 23, 2024 @01:45PM (#40769174)
That's not particularly high for a large scale web application where every file is a ES module, especially so if it includes dependencies.