-
Notifications
You must be signed in to change notification settings - Fork 145
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
Reducing Compile Time #531
Comments
Maybe we should add cargo-deny to our CI? (it warns about duplicated dependencies and some other things) |
Sounds like a nice idea :) |
I'm having a look at good targets to reduce compile time in As always,
|
Hey! I was reading this issue and I wanted to let you know about a tool I recently created that I think maybe some of you can find useful. This is obviously complementary to all these optimizations that you are making and that are clearly good in order to reduce compile times of feather. I had recently stumbled upon some painfully long compile times in some of my personal/work projects written in rust (especially those with lots of dependencies) and I decided to investigate a little about it. I found out that in most cases the overhead was caused by the disk. I created a small cargo command called
The only "bad" thing about this tool is that every time you reboot your PC the incremental build will be lost. Also, this probably worked for me because I was compiling in WSL2 and there was some severe overhead. I have a M.2 SSD. It's far from perfect (and has some known bugs) but I leave you a link to the repo if someone wants to check it out. Thanks for contributing to feather! |
That sounds fantastic! I'll certainly give it a try because this sounds like it'd be useful for all sorts of rust work. What did this slow down looked like in the cargo profiler output? It's pointing fingers at the semantic analysis of a lot of the crates for me, which doesn't sound right if the problem is the disk :D (I suspect my compilation could be being bottlenecked by the memory capacity on my laptop) |
This may be of help. |
I just came across this and saw that The speedup on your system is easily explainable by you compiling a project in WSL2 that was located in the windows filesystem, at which point compilation does become IO bound since WSL2<->Windows file system interop is incredibly slow. You should either keep the project in the WSL2 filesystem or compile from Windows. |
Description
It takes an awful lot of work to compile feather. It'd be nice to see if there's any fat we can trim.
I'm starting with using
cargo-tree
to check out the dependency tree.target-lexicon:0.11.2
may be able to be updated to0.12.2
, removing duplication (aw shucks, it wasn't in the main build)The text was updated successfully, but these errors were encountered: