-
Notifications
You must be signed in to change notification settings - Fork 129
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
fix: improved sdk deployment plan handling and perf improvements #1437
Merged
hugocaillard
merged 9 commits into
main
from
fix/improved-simnet-deployment-plan-handling
Apr 26, 2024
Merged
fix: improved sdk deployment plan handling and perf improvements #1437
hugocaillard
merged 9 commits into
main
from
fix/improved-simnet-deployment-plan-handling
Apr 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hugocaillard
force-pushed
the
fix/improved-simnet-deployment-plan-handling
branch
from
April 25, 2024 14:31
887006f
to
eb04b5e
Compare
hugocaillard
changed the title
fix: improved sdk deployment plan handling
fix: improved sdk deployment plan handling adn perf improvements
Apr 25, 2024
hugocaillard
changed the title
fix: improved sdk deployment plan handling adn perf improvements
fix: improved sdk deployment plan handling and perf improvements
Apr 25, 2024
hugocaillard
commented
Apr 25, 2024
MicaiahReid
previously approved these changes
Apr 26, 2024
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix #1435
This PR started as a bug fix, but as I worked on it, I found that I could get massive perf improvements.
In the SDK
init_session
, some data is cached. Before this PR, just de deployment was cached.But the whole session can actually be cached. It reduces file system access by a lot (in a Vitest context, we now only need to read the manifest and contract once) and reduce the time spent parsing contracts.
On my machine (M1), the cached
init_session
go from more than 100ms to a few ms (the time taken forcache.clone()
). And knowing thatinit_session
is called before each test, it takes the time to run tests in a project like pox-4 testing down from 32sec to 6secsIt also reworks a bit the session and the SDK structs