Skip to content

Conversation

@Gohlub
Copy link
Contributor

@Gohlub Gohlub commented Oct 14, 2025

Problem

I doing some work on core and got tired of waiting to rebuild after each fix (there were ways to make it easier but I just stuck with it).

Solution

Solution was elegant: substitute the iterator method call from `into_iter' to 'into_par_iter' (from the rayon crate), which handles the parallel execution under the hood. Tested it and with no special flags (you can specify the number of cores) got a 2x speedup in the build-package script time (from 6 minutes to sub 3 minutes on a re-build).

Testing

Could be made default but for the PR I left is as an optional flag.

cargo run -p build-packages -- --parallel

Docs Update

Reflected in README

Notes

This was downstream of me just asking an LLM client to 'make it faster'. I wonder if we could apply the same principle to other places in our codebase that have long build times,

@Gohlub Gohlub requested a review from nick1udwig October 14, 2025 15:08
Copy link
Member

@nick1udwig nick1udwig left a comment

Choose a reason for hiding this comment

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

Really nice, thanks for the PR ⚡

@nick1udwig nick1udwig merged commit b723950 into develop Oct 17, 2025
@nick1udwig nick1udwig deleted the fix/parallel-build-packages branch October 17, 2025 19:31
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.

3 participants