-
Notifications
You must be signed in to change notification settings - Fork 67
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
parallelise the code-gen #162
base: master
Are you sure you want to change the base?
Conversation
open questions-
|
I would like to see how this does after #161 gets merged. Maybe the 1.84s of rayon comp time will already make it not worth it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some unnecessary style change to approve this, everything else looks awesome.
Cargo.toml
Outdated
"icarous", | ||
"common", | ||
] | ||
"all-dialects" = ["ardupilotmega", "asluav", "autoquad", "matrixpilot", "minimal", "paparazzi", "python_array_test", "slugs", "standard", "test", "ualberta", "uavionix", "icarous", "common"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not follow up style changes with funcional changes as well, having such list in a huge single line is harder to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem. This was introduced as an artefact of using cargo edit
to add the rayon dependency (which can change formatting), not an intentional change
I agree it's worth merging your changes first and then reassessing. I think also it maybe be worth considering initial compilation and subsequent compilation separately. For example maybe its worth compiling rayon once to get a benefit on every subsequent recompilation of this library |
9b55483
to
d5ae76e
Compare
@GabrielDertoni on my machine, rayon costs 2.79s, in order save 1.2seconds to run the mavlink build script. On that basis it's not worth it for downstream users of this crate. It would be beneficial for developers on this crate who are recompiling repeatedly, but you're talking a 1 second improvement on a total compile time of around 60seconds, so it's a marginal gain. I suspect the change isn't worth it on that basis, unless there's a more lightweight way to parallelise this without rayon. |
Yes, well maybe there are some other ways to more significantly improve compilation speed. In particular in my measurements removing the |
Another way to significantly improve developer experience for this crate is using a separate crate for codegen, and letting it run |
inspired by @GabrielDertoni's work in #161, this PR provides a (much more modest) performance boost by parallelising the code-gen using rayon