# Improving Compile Times on 0.18

**URL:** <https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741>\
**Category:** Show and Tell\
**Created:** [February 23, 2018, 4:41am UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741 "2018-02-23T04:41:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pateh](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@pateh](https://discourse.elm-lang.org/u/pateh)\
**Post date:** [February 23, 2018, 4:41am UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/1 "2018-02-23T04:41:48Z")

</div>

I had posted a request for repos with slower compile times a few weeks back ([Repos with slow compile times wanted for research](https://discourse.elm-lang.org/t/repos-with-slow-compile-times-wanted-for-research/662)), and I got around to writing up a bit on what I found.

> **[Faster Elm Builds](https://medium.com/@antewcode/faster-elm-builds-e0669580ee67)**
>
> I recently joined a company using Elm for a new project, and it has been awesome, Elm is a great platform for front-end development and it…

The TL:DR of it is if you run your build with `elm-make +RTS -s -RTS src/Main.elm` and see a lot of time being spent in garbage collection (“GC” in the output), you can build your own version of `elm-make` that should dramatically improve speeds.

---

<div class="post-metadata">

**Author:** ![pdamoc](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pdamoc/32/36_2.png) [@pdamoc](https://discourse.elm-lang.org/u/pdamoc)\
**Post date:** [February 23, 2018, 5:46am UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/2 "2018-02-23T05:46:09Z")

</div>

Thank you for this. I had lost the links to your compiled binaries.

---

<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:** [February 26, 2018, 9:14am UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/3 "2018-02-26T09:14:31Z")

</div>

Thank you so much for this. Such an improvement to the development process when things are more responsive. A real game changer!

---

<div class="post-metadata">

**Author:** ![reitzig](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/reitzig/32/635_2.png) [@reitzig](https://discourse.elm-lang.org/u/reitzig)\
**Post date:** [February 27, 2018, 7:02pm UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/4 "2018-02-27T19:02:52Z")

</div>

I love how complicated “just give the process enough memory to work with” can be. 😃

---

<div class="post-metadata">

**Author:** ![simonh1000](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/simonh1000/32/100_2.png) [@simonh1000](https://discourse.elm-lang.org/u/simonh1000)\
**Post date:** [March 2, 2018, 10:53am UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/5 "2018-03-02T10:53:11Z")

</div>

Why is it necessary to use Haskell 7.10? I’m not using Haskell for anything else so installing an old version is not a problem, but if I did want the latest I’d rather not have to learn how to run multiple versions at the same time.

And if i understand correctly I need to add `-rtsopts` to the compile options - where do those go in the [https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs](https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs) file?

---

<div class="post-metadata">

**Author:** ![pdamoc](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pdamoc/32/36_2.png) [@pdamoc](https://discourse.elm-lang.org/u/pdamoc)\
**Post date:** [March 2, 2018, 11:22am UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/6 "2018-03-02T11:22:17Z")

</div>

> [@simonh1000](#):
>
> And if i understand correctly I need to add -rtsopts to the compile options - where do those go in the [elm-platform/installers/BuildFromSource.hs at master · elm-lang/elm-platform · GitHub](https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs) file?

`elm-compiler` master is already on `0.19`.

I think the best course of action right now is to use the provided binaries and wait for `0.19` 🙂

---

<div class="post-metadata">

**Author:** ![simonh1000](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/simonh1000/32/100_2.png) [@simonh1000](https://discourse.elm-lang.org/u/simonh1000)\
**Post date:** [March 10, 2018, 3:19pm UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/7 "2018-03-10T15:19:17Z")

</div>

Anyone having any success with the Linux binary at [https://github.com/antew/node-elm-compiler/releases/download/elm-make-files/elm-make.linux.x64](https://github.com/antew/node-elm-compiler/releases/download/elm-make-files/elm-make.linux.x64)? I get

```
~/applications/elm-make.linux.x64 +RTS -A128M -H128M -n4m -RTS Main.elm 
elm-make.linux.x64: Most RTS options are disabled. Link with -rtsopts to enable them.

```

which is what I get with the standard version

---

<div class="post-metadata">

**Author:** ![pateh](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@pateh](https://discourse.elm-lang.org/u/pateh)\
**Post date:** [March 10, 2018, 7:52pm UTC](https://discourse.elm-lang.org/t/improving-compile-times-on-0-18/741/8 "2018-03-10T19:52:08Z")

</div>

Sorry about that @simonh1000, I’ve updated the binary and tested it with a little dockerfile

```
FROM node
RUN curl -sL "https://github.com/antew/node-elm-compiler/releases/download/elm-make-files/elm-make.linux.x64" -o /elm-make && chmod +x /elm-make
RUN curl -sL "https://github.com/antew/node-elm-compiler/releases/download/elm-make-files/LongListMatch.elm" -o /LongListMatch.elm
RUN /elm-make --yes +RTS -s -A128M -RTS LongListMatch.elm

```

It should work correctly now!
