3 ms·
> Build times, especially once the whole constellation of Yesod and Persistent packages are brought into the mix, are not insignificant. It still takes a good 5
by thinkpad20 11y ago
> Build times, especially once the whole constellation of Yesod and Persistent packages are brought into the mix, are not insignificant. It still takes a good 5-10 min to build our larger web application on our beefiest machines. There are optimizations that can be made in this space which we haven't adopted yet, such as caching already build object files to avoid having to re-compile them every time, so I'm confident this will be a non-issue in the nearby future, but it's still worth being aware of. GHC works hard, you need to provide it with enough juice or time to let it do its job.
You hint at the solution to this problem when you mention caching, but I would encourage you to look into the Nix package manager. It's platform and language independent, and is excellent at dramatically speeding up builds by only building anything once. It's gaining popularity in the Haskell community.
- akurilin 11y agoCool! Do you happen to have links to good "how to get started" guides for nix+haskell? Right now it looks like it's a battle between halcyon, stackage-cli and this. I don't quite know yet what fits our use-cases better.
- thinkpad20 11y agoI don't use Nix with Haskell myself yet, because I haven't been doing much Haskelling recently. But I do use it with Python and it's really excellent to use once you start to "get it." Skimming this guide, it seems to do a nice job of explaining Nix as applied to Haskell development[0]. And I'm sure there are many other resources, since it seems to have some traction in that community. I don't know much about the other options you mentioned, but one of the really nice things about Nix is that it's language-independent, which makes it just as easy to express Haskell package dependencies as it is to express any arbitrary dependency (e.g. a foreign library you're linking against). [0]: https://ocharles.org.uk/blog/posts/2014-02-04-how-i-develop-with-nixos.html https://ocharles.org.uk/blog/posts/2014-02-04-how-i-develop-...