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

Speed up tests #1556

Merged
merged 6 commits into from
Jul 12, 2024
Merged

Speed up tests #1556

merged 6 commits into from
Jul 12, 2024

Conversation

georgwiese
Copy link
Collaborator

@georgwiese georgwiese commented Jul 10, 2024

Recent PRs (#1538, #1534) have significantly slowed down the CI, because they run every test twice, once with the "plain" backend and once with the CompositeBackend.

This PR makes sure that at least we only do the steps before (analyzing & optimizing PIL, fixed column computation, witness computation) only once, by making a "prepared" pipeline once and cloning it to test different backends.

This leads to a slight speed up in the tests.

Comment on lines +119 to +122
/// The temporary directory, owned by the pipeline (or any copies of it).
/// This object is not used directly, but keeping it here ensures that the directory
/// is not deleted until the pipeline is dropped.
_tmp_dir: Option<Rc<Temp>>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is much more convenient and save, otherwise you have to keep around the Temp object around for as long as the pipeline lives.

I think we used to do it like that before, not sure we stopped? Maybe because we wanted Pipeline to be clone-able? But the Rc does exactly what you'd want.

@georgwiese georgwiese changed the title [WIP] Speed up test Speed up tests Jul 12, 2024
@georgwiese georgwiese marked this pull request as ready for review July 12, 2024 13:21
@leonardoalt leonardoalt added this pull request to the merge queue Jul 12, 2024
Merged via the queue into main with commit 3801937 Jul 12, 2024
6 checks passed
@leonardoalt leonardoalt deleted the speed-up-test branch July 12, 2024 15:16
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