Skip to content
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

add parallelism to autorust using rayon #1416

Merged
merged 2 commits into from
Sep 24, 2023

Conversation

demoray
Copy link
Contributor

@demoray demoray commented Sep 22, 2023

This PR does two things:

  1. Moves to iterating over the crates to be generated via rayon for multi-processing
  2. Moves to formatting the rust code using rustfmt via stdin/stdout rather than cargo fmt at the end.

This speeds up generation by 390% on my workstation.

Copy link
Member

@cataggar cataggar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my Azure DevBox, here are the results.

Before on main:
cargo build --release
timeit cargo run -p azure-autorust --release
6min 20sec 970ms 842µs 400ns

With this PR:
cargo build --release
timeit cargo run -p azure-autorust --release
1min 42sec 565ms 421µs 900ns

This is wonderful!

@cataggar cataggar merged commit 1f66c69 into Azure:main Sep 24, 2023
19 checks passed
@demoray demoray deleted the add-parallelism-to-autorust branch September 28, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants