←back to thread

302 points Bogdanp | 3 comments | | HN request time: 0.869s | source
Show context
AndyKelley ◴[] No.44390865[source]
My homepage takes 73ms to rebuild: 17ms to recompile the static site generator, then 56ms to run it.

    andy@bark ~/d/andrewkelley.me (master)> zig build --watch -fincremental
    Build Summary: 3/3 steps succeeded
    install success
    └─ run exe compile success 57ms MaxRSS:3M
       └─ compile exe compile Debug native success 331ms
    Build Summary: 3/3 steps succeeded
    install success
    └─ run exe compile success 56ms MaxRSS:3M
       └─ compile exe compile Debug native success 17ms
    watching 75 directories, 1 processes
replies(8): >>44390894 #>>44390942 #>>44390948 #>>44391020 #>>44391060 #>>44391265 #>>44391881 #>>44393741 #
1. nicoburns ◴[] No.44391881[source]
My non-static Rust website (includes an actual webserver as well as a react-like framework for templating) takes 1.25s to do an incremental recompile with "cargo watch" (which is an external watcher that just kills the process and reruns "cargo run").

And it can be considerably faster if you use something like subsecond[0] (which does incremental linking and hotpatches the running binary). It's not quite as fast as Zig, but it's close.

However, if that 331ms build above is a clean (uncached) build then that's a lot faster than a clean build of my website which takes ~12s.

[0]: https://news.ycombinator.com/item?id=44369642

replies(1): >>44391968 #
2. AndyKelley ◴[] No.44391968[source]
The 331ms time is mostly uncached. In this case the build script was already cached (must be re-done if the build script is edited), and compiler_rt was already cached (must be done exactly once per target; almost never rebuilt).
replies(1): >>44392021 #
3. nicoburns ◴[] No.44392021[source]
Impressive!