-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
huge file size in tarpaulin builds #516
Comments
So tarpaulin uses link-dead-code as a linker option because otherwise it doesn't detect unused functions in your own code. I don't think there's a way to specify a linker flag and not have it propagate to all the dependencies so this would mean all the unused parts of your dependencies can be linked in as well. I'd guess this is what creates the bloat. Alternatively, I could look at removing the flag and using the source-analysis part of tarpaulin to identify every line you can hit but that's a significant amount of work and might not be robust against things like macros. I've been wondering for a while if that was a worthwhile route to take so I'll start to look towards prototyping something for it and let you know if I make some progress 👍 Also side note you don't need |
Hi @xd009642 thank you for your answer, it helps me alot understanding what is going on (: |
So I'm going to close this as inactive, but I am watching some RFCs on crate specific RUST_FLAGS which will dramatically reduce file sizes! Unfortunately my other experiments in this area didn't work |
Hey devs,
We did some tests in our CI, where we are doing `cargo check, build, test, bench, doc, release builds, and tarpaulin.
We stored their caches in different directories:
with the following sizes
we noticed that tarpaulin allone uses 11GB, while all other builds, including check, build, test, bench, doc only take 5GB of space.
And in this issue we wanted to ask if there is potential point of improvement.
We know that tarpaulin ofc needs to add some information to the binaries in order to check the coverage, but lets go on:
we see 6 GB of dependencies and 4 GB of incremental builds
these big files in total are about 2581MB from 5.7 GB total.
I am wondering 2 things here:
My first question is: are these duplicates needed ?
We are building in a fresh docker file and we are executing exactly once this (in 2 seperate docker files though (https://gitlab.com/veloren/veloren-docker-ci/-/tree/master)):
The next question i have is:
lets compare witht he normal
cargo build
sizes:if we don't cover those libs, couldn'd we use the smaller file size version of them?
also when inspecting the
cache-tarpaulin/debug/incremental
directory i noticed that it has alot of duplicate folders:e.g.
Some finishing words:
Ofc we are aware that you are prob not the
cargo
guys and don't know all the internals.However whe are creating 20GB docker images in order to provide our runners with caches. And just wanted to ask for you to seek some optimizing potential, reducing it to like 16GB would already be a great win :)
With that said: Have a nice day :)
The text was updated successfully, but these errors were encountered: