-
Notifications
You must be signed in to change notification settings - Fork 232
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
try to run generate
in parallel
#2247
Comments
I'm not against introducing parallelization where it makes sense, but it does add complexity. |
In my project it takes 4m, it is a bottleneck for my workflow. |
Honestly that is surprising to me. |
I haven't profiled it, no. I'm generating only for kotlin, The generated file is 675KB |
That's honestly surprising it takes that long and I think there might be other things going. To note for Glean it's near-instantenous:
resulting in a 424KB Kotlin file. Do those 4 minutes include fully building uniffi-bindgen first? |
We're using the macro approach, and I'm not including building uniff-bindgen. I'm also building it as release. |
Is your code open-source so we can take a look at that? |
It's unfortunately not... |
If |
how can I know what's taking long in the build? Do you have any form of self profiling? |
We don't have any profiling but we've also never seen this take more than a trivial amount of time. You probably need to use a local build with manually added println statements. What command exactly are you executing? |
The measured time of 4m was done after building this. |
We were having a similar issue with long build times for Kotlin bindings generation and it turns out It'd probably be worth adding a log output for when the binding generation is complete and maybe even mention that the build will now start formatting the code. That way if anyone else has a similar issue, they can quickly identify the cause of it. |
This is it! |
There are lots of oportunities to parallelize the generating code using something like rayon and it will speed up some builds by a lot!
The text was updated successfully, but these errors were encountered: