-
Notifications
You must be signed in to change notification settings - Fork 253
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
Greatly increased compile times when upgrading from grpcio:0.9
to grpcio:10.2
#578
Comments
You can enable it by environment variables |
Are you sure I can't seem to find that this makes a difference in build time or |
You can check the logs in target directory to see what launcher it's using. For example, |
To reduce compile time (and the size of target directory), TiKV disable debug info from grpcio in debug mode. The side affect is you won't be able to set a breakpoint or step into the grpcio. |
Are you using |
No, we don't use sccache. We do use cache in CI. |
I'm just coming back to this again. Have you considered instructing
from https://docs.rs/cc/1.0.79/cc/#parallelism Building the codebase with a single worker takes a looooong time. |
Interesting, never used this feature, but I think it worth a try. Note you can also enabling the feature without changing grpcio by including cc as a dependency of your project and enabling the feature. The feature will then also be used by grpc-rs. If there is any improvement, please let me know. |
The issue appears to come from the way we build gRPC Core. It is also not reproducible on all platforms (happens on Arch but not in an Ubuntu docker for instance). It's been a bother for us since ~ mid January.
Notice:
It takes ~10 min for us to build grpcio-sys due to this. Setting the
The message doesn't show in either case when compiling manually https://github.com/pingcap/grpc/tree/996605a5e62f3f00043ac8d3ebca84523bc2dd76 |
That's exactly right. I'm on Archlinux as well and I see |
This project doesn't control the parallelism of build. Instead, it's controlled by cargo. Cargo has its own jobserver, and cmake-rs will bridge the jobserver from cargo with cmake/make. However, I think @Ten0 has given a good workaround. And for those who accepts build system other than make, you can also use ninja by |
Probably related to rust-lang/jobserver-rs#47. |
I'm going to close this ticket as parallel and cached builds have gotten me back to the previous baseline. |
@purew I don't understand - it seems the issue is still present: parallel build should enable and it doesn't. |
👍 feel free to keep the ticket open. I agree with the workaround classification. |
I don't have the necessary access to reopen it. |
I'm experiencing this issue too. Build times are crazy, and single threaded. |
|
Same way as you pass CMAKE_GENERATOR. |
The rest of the build utilizes
sccache
https://github.com/mozilla/sccache/ for caching of build-artifacts between builds.However, it does not seem like the grpc-C++ library makes use of
sccache
. Is there any way of setting the Cmake option-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
which another part of the project uses for the C++ dependency?The text was updated successfully, but these errors were encountered: