Holy Cow. I am FLOORED.
I just spend the last 7 days upgrading our 46,713 loc Elm app from 0.18 to 0.19.1.
Unbelievable. Amazing. Wow.
It was a bit of work to get rid of the two native functions, etc, etc. But overall very satisfying.
I feel like I just Marie Kondoed the codebase.
At some point, I’ll post a big long thing but just wanted to give a HUGE shoutout to @evancz and whoever else worked on getting it out the door.
It really feels like magic. Like I just tapped into a supercomputer at CERN.
Our Elm codebase is fairly large and, as many functions touch many parts of the codebase, I’d literally take a stroll as my quad-core MacBook Pro pinned all of its CPUs. I’d work with the CPU History floating so I could see from across the room when the build finished. It was typically around 2 to 3 minutes, give or take. It was getting to the point where it was become frustrating to iterate, as I run with the Webpack dev server which compiles on save.
Now, it’s like a second–maybe a 100 to 200x faster? Unreal!
(pause to get actual stats…)
Okay, so here’s changing a “worst-case” module - a 1,500 line file that is used by a ton of modules. It recompiles in under a second! And doesn’t trigger a rebuild of everything under the sun! This used to be a coffee break.
ℹ ｢wdm｣: Compiling... Started compiling Elm.. Running elm make /app/assets/elm/src/Main.elm --debug --output /tmp/2019927-24092-3pj1pn.p2vtd.js Success! Compiled 1 module. Main ───> /tmp/2019927-24092-3pj1pn.p2vtd.js ℹ ｢wdm｣: Hash: 239d933a426280356c85 Version: webpack 4.41.2 Time: 669ms
The full rebuild after deleting
Running elm make /app/assets/elm/src/Main.elm --debug --output /tmp/2019927-23958-1pp3egr.kz6l.js Dependencies ready! Success! Compiled 100 modules. Main ───> /tmp/2019927-23958-1pp3egr.kz6l.js Hash: aebd6202066d8f290e41 Version: webpack 4.41.2 Time: 3244ms Built at: 2019-10-27 03:11:12
3.2 seconds for a full build in debug mode?!? Insane! (w/o debug is about 3.0 seconds)
(kinda weird that it’s exactly 100 modules!)
I didn’t really get why the focus on 0.19 was compile speed. Now I do!