alexmingoia / pux-starter-app

Starter Pux app w/ hot-reloading and isomorphic routing and rendering
https://www.purescript-pux.org
BSD 3-Clause "New" or "Revised" License
101 stars 39 forks source link

Huge build times #14

Closed dariooddenino closed 8 years ago

dariooddenino commented 8 years ago

Hi, I've just cloned this repo and started it following the readme.

My problem is that each build takes ~30/40 seconds, even on hot reloads. Every time I get something between 150 and 750 warnings.

Basically it stays on the webpack building... message for those 30/40 seconds and then dumps all the warnings and the bundle is now VALID message.

I'm on Ubuntu 15.10, psci is version 0.8.3.0 (if it matters)

Thanks!

alexmingoia commented 8 years ago

You should only be getting warnings on the first build. Subsequent builds in watch mode shouldn't trigger a huge amount of warnings. The warnings are from the purescript compiler, and are because most modules haven't been updated to using specified imports which started generating warnings in purescript 0.8.

The build times are a separate issue. There's two problems:

So TLDR hang tight and I should have both those issues resolved.

dariooddenino commented 8 years ago

Hi, thanks for the answer!

I'm confused now as I had people on slack telling me they had around 2/3 seconds build time on hot reload!

Yeah, I noticed the the build is triggered twice. The first one takes most of the time (pratically all of it) and the second one is < 1 sec.

Thanks for your hard work!

shybyte commented 8 years ago

@alexmingoia I'm looking forward to the new loader with per-file-build-speedup. Currently I have a re-build time of ~11 seconds on the unmodified starter-app, which neutralizes the advantages of hot reloading a bit. Thanks for your great work!

alexmingoia commented 8 years ago

An update on the new loader: I've made a PR to the existing purs-loader module: ethul/purs-loader/pull/47

If that's not accepted I'll release it as a separate module and update the starter-app accordingly.

alexmingoia commented 8 years ago

The new release is using purs-loader@1.0.0-rc.1, which should be much quicker, solves the double-compilation issue, and has optional experimental support for instant-rebuilds using psc-ide (https://github.com/ethul/purs-loader#instant-rebuilds-experimental)