-
Notifications
You must be signed in to change notification settings - Fork 448
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
Performance regression between cc 1.0.90 and 1.0.91, regression is also present in 1.0.96 #1048
Comments
Given the number of calls to |
@AlexanderSchuetz97 can you please try https://github.com/dpaoliello/cc-rs/tree/perf? [patch.crates-io]
cc = { git = "https://github.com/dpaoliello/cc-rs.git", branch = "perf" } |
@dpaoliello Thanks for the quick response! Though I'd have to say that adding a new parameter to a public function would break many crates. I'd suggest to
|
Ah, didn't realize that |
Yeah I think it's worth a PR regardless of if it fixes the regression. |
I will only be able to access this project on monday. I will perform the perf suggestion then and report my findings. |
Done #1050 |
Hello again, this fix appears to significantly improve performance. |
I was waiting for one last nit to be resolved, but I can edit the PR directly and merge it. Would cut a release soon after merging it. |
It also looks like we need a performance benchmark suite in cc |
This would probably be a good idea.
Thank you. Since the PR is merged I will close this issue. You should track the benchmark implementation in issue #1065 |
Hello, I am noticing a massive decrease in performance of the CC dependency when updating to version 1.0.91.
When used with mingw to build a windows shared library the decrease in performance is about factor 2. It used to take 30 seconds to build my project now it takes 60 seconds.
To build a linux shared library I use cargo zigbuild. The difference is about factor 7 with zigbuild,
It used to take about 50 seconds, now it takes well above 7 minutes. Nothing else has changed in my project other than the cc version.
Between each test I ran cargo clean to ensure that it does a clean build. I think something is up here.
My project features a large percentage of C code. (About 80% is C code, the rest is rust)
I dont have any C++ in my project.
I would not have reported this issue here if it was just zigbuild that was affected, even the normal mingw toolchain is affected.
Does anyone have any idea on significant changes betwen those versions that could affect performance?
The only observable difference in terms of log output appears to be that warnings about gcc version mismatch that used to be there are now missing when building the windows library. (Which is positive I guess... but not worth the horrible performance)
These are my dependencies and cargo configuration:
This is my build.rs, the only thing configured here is the cc crate
As mentioned the only change needed to tank into oblivion the compilation speed is to update the cc crate.
This entire build is done on windows 11.
The text was updated successfully, but these errors were encountered: