← Back to context

Comment by danpalmer

16 hours ago

I have a codebase of a similar size, using the same web framework, and my codebase does a full clean build on my Macbook Air in less than 2 mins. A re-compilation dev build is ~5 seconds.

I'd guess the 10 mins is a few things... Vapor, and in particular its ORM Fluent, are noticeably slow to compile. It's common for a single function doing an ORM query to take 200ms to compile. I use warnings for >100ms compilation to spot these and adding a few types or extracting a piece into a utility function solves it. I'd guess they also have a ton of dependencies. I have ~20 or so, most aren't very big.

At work I use Go, and while builds are fast, on a medium sized codebase with a bunch of codegen, the difference for dev builds doesn't affect my workflow.

There's a debate to be had around whether Swift is ready for the server (I'm a strong advocate for yes, but it's not a done deal), but honestly compilation time isn't a factor. Rust is noticeably slower in my experience and I don't see people questioning whether it's ready for server development because of it.