On Fri, Mar 5, 2021 at 11:17 PM Ben Pfaff <[email protected]> wrote: > > On Fri, Mar 05, 2021 at 11:13:09PM +0100, Frode Nordahl wrote: > > However, when I got to the building of the rust crates part I found > > that it would both rebuild stuff when not needed and not do any > > parallelization for individual crate builds. > > > > This will probably itch enough for me to eventually look at it, but I > > thought it would be worthwhile to send this e-mail to the list and ask > > if anyone has ideas for how to improve re-use of already built objects > > and parallelization of individual crate builds for a rust build > > process. > > I don't think that building an individual crate is something that can be > parallelized. (I'd be happy to be shown to be wrong.)
Unfortunately you're right, this fairly recent update [0] in the Rustc development guide suggests there is a fair amount of groundwork that needs to be done before any parallelizing work can come to fruition. Some people suggest splitting code into Cargo Workspaces, and I see we already do that to some extent, and I kind of doubt it would be worth splitting any further just for the sake of faster compilation. Having said that, some of the generated rust code files are pretty huge, so maybe there could be something there. > I haven't noticed unnecessary rebuilds. Do you have an example? As I was validating changes that would affect all the tests I was iterating using distcheck to be sure to get an accurate reading of the result, and distcheck of course recompiles everything by design. When running regular builds in the top level source directory only the affected parts of the rust code is rebuilt as expected, so sorry about suggesting otherwise. I was fooled by the C code building before I could blink an eye and the rust parts taking a while longer. 0: https://rustc-dev-guide.rust-lang.org/parallel-rustc.html -- Frode Nordahl _______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
