# How are 0.19 compile times for 50k+ LOC projects?

**URL:** <https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680>\
**Category:** Learn\
**Created:** [May 21, 2019, 7:09pm UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680 "2019-05-21T19:09:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![evancz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/evancz/32/16_2.png) [@evancz](https://discourse.elm-lang.org/u/evancz)\
**Post date:** [May 21, 2019, 7:09pm UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/1 "2019-05-21T19:09:18Z")

</div>

Now that folks have had more time to upgrade to 0.19, I’d like to gather compile times from folks with large projects. Ideally 50k+ or 100k+ lines of code.

**If you have such a project,** please reply here or reach out to me directly!

**If you know someone with such a project** , please encourage them to get in contact.

I am curious to hear (1) compile-from-scratch times and (2) incremental compile times, but the point now is to **identify** people who can potentially provide data points!

Once I have a better idea of what is out there, maybe there can be some methodology that helps the data points cohere. I know with NoRedInk the full build process includes some non-Elm things which makes measuring the Elm part more difficult, so gathering data may depend on the particulars of the codebase to some extent. We’ll see when we have more leads!

---

<div class="post-metadata">

**Author:** ![ondrej-tucek](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/ondrej-tucek/32/1451_2.png) [@ondrej-tucek](https://discourse.elm-lang.org/u/ondrej-tucek)\
**Post date:** [May 21, 2019, 7:58pm UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/2 "2019-05-21T19:58:24Z")

</div>

I’ve recently read a couple of very nice reports

- [Our Experience upgrading to 0.19 at Humio](https://discourse.elm-lang.org/t/our-experience-upgrading-to-0-19-at-humio/3258) - @Chadtech
- [ContaSystemer AS current stats](https://discourse.elm-lang.org/t/contasystemer-as-current-stats-and-thank-you-the-community/3348) - @akoppela  
and found [elm-19-upgrade](https://gist.github.com/mordrax/efcd34739ed56bb64d2b12d2401b7291) - mordrax

It could be helpful to you, I guess…

---

<div class="post-metadata">

**Author:** ![albertdahlin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/albertdahlin/32/868_2.png) [@albertdahlin](https://discourse.elm-lang.org/u/albertdahlin)\
**Post date:** [May 22, 2019, 6:19am UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/3 "2019-05-22T06:19:17Z")

</div>

Here are the compile stats for our Elm sites that are live:

| Site | LOC | Modules | Full | Incremental |
| --- | --- | --- | --- | --- |
| [Vanbruun](https://vanbruun.com) | ~100k | 717 | 10.6s | 2.0s |
| [Scanfast](https://scanfast.se) | ~90k | 805 | 20.0s | 2.5s |
| [Himla](https://himla.com) | ~80k | 739 | 8.1s | 1.6s |
| [Powerwoman](https://powerwoman.com) | ~75k | 737 | 13.6s | 1.7s |
| iZettle Shop | ~50k | 498 | 5.1s | 1.0s |

All measurements are made with `time elm make Main.elm --output /dev/null` on  
Ubuntu 16.04 on a Desktop Computer with i7@4.5Ghz

---

<div class="post-metadata">

**Author:** ![michaeljones](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/michaeljones/32/152_2.png) [@michaeljones](https://discourse.elm-lang.org/u/michaeljones)\
**Post date:** [May 23, 2019, 3:51pm UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/4 "2019-05-23T15:51:37Z")

</div>

My company has a code base of around 96k lines across ~350 modules (to my surprise!) It is unevenly split between 3 different apps. I imagine at least one is firmly over 50k lines though.

Happy to help if I can.

---

<div class="post-metadata">

**Author:** ![Janiczek](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/janiczek/32/4516_2.png) [@Janiczek](https://discourse.elm-lang.org/u/Janiczek)\
**Post date:** [May 23, 2019, 10:45pm UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/5 "2019-05-23T22:45:12Z")

</div>

| Site | LOC | Modules | Full | Incremental |
| --- | --- | --- | --- | --- |
| GlobalWebIndex | 63k | 218 | 5.7s | 1.5s |

All measurements are made with `time elm make Main.elm` on  
Ubuntu 18.04 on a laptop with i7@2.6Ghz

---

<div class="post-metadata">

**Author:** ![Sebastian](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/sebastian/32/98_2.png) [@Sebastian](https://discourse.elm-lang.org/u/Sebastian)\
**Post date:** [May 25, 2019, 7:54am UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/6 "2019-05-25T07:54:15Z")

</div>

Our app [https://www.stax.io/](https://www.stax.io/) has 120K lines of Elm

Full: 13s  
Incremental: 5s Depending on what you change, 10s when changing common modules.

Using `time elm make src/Elm/App.elm`  
On a MacBookPro i7 2014

---

<div class="post-metadata">

**Author:** ![turboMaCk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/turbomack/32/355_2.png) [@turboMaCk](https://discourse.elm-lang.org/u/turboMaCk)\
**Post date:** [May 25, 2019, 11:57am UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/7 "2019-05-25T11:57:13Z")

</div>

I got 3.7s for full build (after make clean) on a laptop with i7-8650U CPU @ 1.90GHz NixOS. On 15" macbook consistently over 5s though so seems the gen of processor or something can make quite some difference. Not sure how to even measure incremental builds - that would need some statistically appropriate sample of changes.

> I know with NoRedInk the full build process includes some non-Elm things which make measuring the Elm part more difficult

Thant’s same for us but it’s single page app so it’s easy to bypass and still build all elm.

Also note that that app has 2 main modules and it seems both are measured to loc and compile times. So technically it’s probably a bit smaller. Like 10k app + 50k app. Probably the main entry still will be over 50k when empty lines and comments are counted (I’m using cloc).

---

<div class="post-metadata">

**Author:** ![Janiczek](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/janiczek/32/4516_2.png) [@Janiczek](https://discourse.elm-lang.org/u/Janiczek)\
**Post date:** [May 25, 2019, 5:47pm UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/8 "2019-05-25T17:47:13Z")

</div>

My incremental build was with no changes, right after the full compilation from scratch.

I compiled the main big app. The line counts are with blank and comment lines 🙃

---

<div class="post-metadata">

**Author:** ![bitterjug](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/bitterjug/32/516_2.png) [@bitterjug](https://discourse.elm-lang.org/u/bitterjug)\
**Post date:** [May 29, 2019, 9:31am UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/9 "2019-05-29T09:31:58Z")

</div>

Here are the times for the app [we spoke about last year](https://www.youtube.com/watch?v=0AosqGTEa0Q) at Elm Europe. Currently at 194KLOC. The incremental time depends what you change, so I include a couple examples.

| Build | Modules compiled | Time |
| --- | --- | --- |
| Full | 886 | 21s |
| Incremental (`Main.elm`) | 1 | 3s |
| Incremental (common dependency) | 66 | 10s |

Times with `time npx elm make src/Main.elm --output /dev/null` on Ubuntu 18.04, Core i5, 1.6GHz&nbsp;⨉&nbsp;8.

---

<div class="post-metadata">

**Author:** ![evancz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/evancz/32/16_2.png) [@evancz](https://discourse.elm-lang.org/u/evancz)\
**Post date:** [June 8, 2019, 9:32am UTC](https://discourse.elm-lang.org/t/how-are-0-19-compile-times-for-50k-loc-projects/3680/10 "2019-06-08T09:32:00Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
