Skip to content

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