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

fix: improved sdk deployment plan handling and perf improvements #1437

Merged
merged 9 commits into from
Apr 26, 2024

Conversation

hugocaillard
Copy link
Collaborator

@hugocaillard hugocaillard commented Apr 24, 2024

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 for cache.clone()). And knowing that init_session is called before each test, it takes the time to run tests in a project like pox-4 testing down from 32sec to 6secs

It also reworks a bit the session and the SDK structs

@hugocaillard hugocaillard force-pushed the fix/improved-simnet-deployment-plan-handling branch from 887006f to eb04b5e Compare April 25, 2024 14:31
@hugocaillard hugocaillard changed the title fix: improved sdk deployment plan handling fix: improved sdk deployment plan handling adn perf improvements Apr 25, 2024
@hugocaillard hugocaillard marked this pull request as ready for review April 25, 2024 15:59
@hugocaillard 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
MicaiahReid
MicaiahReid previously approved these changes Apr 26, 2024
components/clarinet-sdk-wasm/src/core.rs Outdated Show resolved Hide resolved
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
@hugocaillard hugocaillard merged commit 70636d3 into main Apr 26, 2024
19 checks passed
@hugocaillard hugocaillard deleted the fix/improved-simnet-deployment-plan-handling branch April 26, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Handle contract deletion in simnet deployment plan
2 participants