First build in watch mode is very slow
Closed this issue · 7 comments
If i launch jumpsuit watch
for the first time in a project it has to build a lot of things, then every time a file changes it rebuilds in less time.
If I close the development server and open it again on the same project it still takes a lot of time, It could use some caching so the time to build is more like in succesive builds.
% jumpsuit watch
_ _ _
|_|_ _ _____ ___ ___ _ _|_| |_
| | | | | . |_ -| | | | _|
_| |___|_|_|_| _|___|___|_|_|
|___| |_|
▸ running at http://localhost:8000
▸ building... ✓ (7259ms)
▸ building... ✓ (1416ms)
▸ building... ✓ (1425ms)
▸ building... ✓ (1014ms)
▸ building... ✓ (967ms)
This would be great, but I'm not sure if that's possible with browserify or webpack. Thoughts @jsonmaur?
@hugochinchilla, #51 is fixed now. Hopefully that eases the pain of the first build. npm install jumpsuit-cli -g
to try it out
Aside from buying a computer with a faster CPU, I'm not sure how this could be fixed. I'm not aware of any way to reuse old builds to make startup time faster; seems like a bad idea anyway, as it could cause a lot of issues with stale code, etc. Which is why we delete the entire dist
folder and rebuild stuff on startup--to ensure we're starting from a clean slate. We do cache after the initial build though, which helps a ton when developing.
Also, I'm assuming you have no third-party dependencies and are using a fresh install of Jumpsuit? Adding new libraries (especially hefty ones like D3) will have a big impact on the build times.
@tannerlinsley works great, #50 is less of a problem now, I will only start the server once a day now :)
@jsonmaur I'm only using a fresh install of jumpsuit with no additions so far