Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce size of slug generated by Anvil #39

Closed
rehno-lindeque opened this issue Apr 11, 2014 · 5 comments
Closed

Reduce size of slug generated by Anvil #39

rehno-lindeque opened this issue Apr 11, 2014 · 5 comments

Comments

@rehno-lindeque
Copy link
Contributor

Right now uploading a large project to anvil is extremely slow - easily 30 minutes or more I think. This is because the dist/ and .cabal-sandbox/ directories can get very large (I think... currently these directories weigh in at around 370MB for our project).

One thing I attempted was to add these two paths to the .slugignore file. At first I thought that this was working, but it seems like I was fooled by the anvil upload continuing where it left off.

I also tried

heroku build -r https://github.com/username/project.git -b https://github.com/begriffs/heroku-buildpack-ghc.git#master

instead of

heroku build -r -b https://github.com/begriffs/heroku-buildpack-ghc.git#master

Don't know if there are any better options - would be great if anvil had some kind of .anvilignore configuration. It would also be great to decrease the size of the slug. I'll add comments to this issue as I figure things out...

@rehno-lindeque rehno-lindeque changed the title Add .slugignore instructions Slow uploads to anvil Apr 11, 2014
@rehno-lindeque rehno-lindeque changed the title Slow uploads to anvil Slow uploads to anvil and large slugs Apr 11, 2014
@puffnfresh
Copy link

The README should make it clear to do a git clean -fdx or just clean up the local directory before using the Anvil build. I spent a while trying to figure out what I was doing wrong when I saw it was going to take 3.5 hours to upload my app!

Running the following is now letting it do things:

$ cabal sandbox delete
$ rm -r dist

@rehno-lindeque
Copy link
Contributor Author

Oh thank you so much! I'm going to try that now. Too bad that it forces you to rebuild again locally...

@rehno-lindeque
Copy link
Contributor Author

Currently using

mkdir -p /tmp/deploy-stash ; mv .cabal-sandbox /tmp/deploy-stash  ; mv dist /tmp/deploy-stash

stash my compiled files, and

mv /tmp/deploy-stash/.* . ; mv /tmp/deploy-stash/* .

to restore them. (It takes a really long time to rebuild everything)

@rehno-lindeque
Copy link
Contributor Author

@begriffs Shall I remove "the large slug" bit from this issue? It might make more sense to have some more concrete issues like #2 and #44 addressing this.

I'm thinking that some kind of .anvilignore file would really be a much less hacky solution to this issue, so I created an issue here ddollar/heroku-anvil#19

@begriffs begriffs changed the title Slow uploads to anvil and large slugs Reduce size of slug generated by Anvil Apr 24, 2014
@begriffs
Copy link
Owner

The cleanup pre-anvil steps are noted in the readme now. I'm going to close this issue since we have more specific ones now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants