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 by 10x by compiling dependencies with optimizations. #329

Merged
merged 2 commits into from
Jan 28, 2023

Conversation

obi1kenobi
Copy link
Owner

@obi1kenobi obi1kenobi commented Jan 28, 2023

In dev and test configurations, compile all dependencies with optimizations enabled, but still checking debug assertions and overflows.

This produces a more than 10x speedup on tests, since the tests check dozens of test crates with dozens of Trustfall queries.

@obi1kenobi
Copy link
Owner Author

For some reason, I couldn't get the same speedup by enabling optimizations for only trustfall_core, trustfall_rustdoc, and trustfall-rustdoc-adapter. It also didn't look like cargo's rebuild detection was correctly realizing which dependencies' settings had changed: adding or changing overrides for one of those packages didn't always cause a rebuild of that package.

The other thing that wasn't clear is whether overrides for trustfall-rustdoc-adapter would apply to all major versions being included (we have 4), or whether the override was just not applying to anything and needed to instead be specified individually per-version. The cargo docs didn't seem to say one way or the other. Possible documentation issue?

cc @epage, perhaps of interest.

@obi1kenobi obi1kenobi requested a review from epage January 28, 2023 17:56
@obi1kenobi
Copy link
Owner Author

This is my first time editing profile settings, so I'd love a review from @epage just in case I messed something up.

@obi1kenobi obi1kenobi added the C-enhancement Category: raise the bar on expectations label Jan 28, 2023
Copy link
Collaborator

@epage epage left a comment

Choose a reason for hiding this comment

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

Eh, I don't touch this much either

@obi1kenobi obi1kenobi merged commit 3d0a336 into main Jan 28, 2023
@obi1kenobi obi1kenobi deleted the speed_up_tests branch January 28, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: raise the bar on expectations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants