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

Make the mock transaction less expensive #1025

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

rylev
Copy link
Contributor

@rylev rylev commented Aug 18, 2022

In order to find the root of the cargo workspace to find where all the transaction files live, the mock transaction shells out to cargo metadata. However, this call is very expensive (~500ms per call) so we want to only do it once. This changes the mock transaction to cache the result.

This can save several sections in tests where there are many mock transactions. This makes the cosmos test suite about 4 times faster on my machine (8s to 2s).

@rylev rylev marked this pull request as ready for review August 18, 2022 17:51
@rylev rylev merged commit cf01950 into Azure:main Aug 19, 2022
@rylev rylev deleted the make-mock-transaction-less-expensive branch August 19, 2022 12:01
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.

2 participants