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

lighthouse build dir is taking up too much space #4756

Open
zhiqiangxu opened this issue Sep 20, 2023 · 4 comments
Open

lighthouse build dir is taking up too much space #4756

zhiqiangxu opened this issue Sep 20, 2023 · 4 comments
Labels
question Further information is requested UX-and-logs

Comments

@zhiqiangxu
Copy link
Contributor

Yesterday I run out of space and at last I found:

67G	/Users/xxx/Desktop/github/lighthouse

I'm also building many other rust projects, this is the largest I've seen so far...

@michaelsproul
Copy link
Member

Yeah with incremental compilation enabled it can get really big really fast. I'm not sure why Lighthouse would be larger than other projects you're working on, but we do have a lot of dependencies (around 1300). Our use of monomorphization for different EthSpec types also blows up the amount of code generated.

Usually I just run cargo clean periodically. You can always run it when updating Rust, because the old artefacts won't work with the new compiler anyway.

You could also try disabling incremental compilation with CARGO_INCREMENTAL=0, but this will make the build time a lot longer.

@michaelsproul michaelsproul added UX-and-logs question Further information is requested labels Sep 20, 2023
@zhiqiangxu
Copy link
Contributor Author

Thanks for the tips, I've been using rustc 1.67.0-nightly (ff8c8dfbe 2022-11-22) for a while, and here're some other project sizes for comparison:

9.1G	/Users/xxx/Desktop/github/snarkOS
 12G	/Users/xxx/Desktop/github/snarkVM
5.5G	/Users/xxx/Desktop/github/rust-fil-proofs
1.1G	/Users/xxx/Desktop/github/halo2
2.9G	/Users/xxx/Desktop/github/zkWasm
1.9G	/Users/xxx/Desktop/github/Nova
1.2G	/Users/xxx/Desktop/github/leo
 10G	/Users/xxx/Desktop/github/builtin-actors

@michaelsproul michaelsproul changed the title lighthouse is taking up too much space lighthouse build dir is taking up too much space Sep 20, 2023
@jmcph4
Copy link
Member

jmcph4 commented Sep 25, 2023

@zhiqiangxu Any progress on this? Did disabling incremental compilation help at all? Funnily enough, I was perusing my own Rust build directories (for Lighthouse and otherwise) and realised just how large they can get.

@zhiqiangxu
Copy link
Contributor Author

Didn't try yet, as compilation is automatically triggered by IDE, vscode in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested UX-and-logs
Projects
None yet
Development

No branches or pull requests

3 participants