-
Notifications
You must be signed in to change notification settings - Fork 44
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
Adapt Storage
and SnapshotSource
to use Rc
only.
#700
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, though not sure what are the expected additional changes to move this from the 'draft' state to review.
Thanks @dmkozh. I just want to go through the whole stack: core, sdk, rpc to make sure there are no major disruptions there if this lands. Once that's done, I'll mark this ready for review. |
The churn on the downstream (core, sdk, rpc) seems pretty minimal (see the three draft PRs mentioned above), so I'm marking this ready for review. |
751ff58
to
1bd2cac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid step in the right direction, but a few things to clean up.
@graydon I've addressed all your feedback around changing
|
### What Adapt to env changes in stellar/rs-soroban-env#700 ### Why [TODO: Why this change is being made. Include any context required to understand the why.] ### Known limitations [TODO or N/A]
What
Resolves #603.
This PR explores the 2nd solution described in the issue above. By adapting the
Storage
andSnapshotSource
to usingRc
, it eliminates the unnecessary cloning ofLedgerKey
andLedgerEntry
.Why
The
LedgerKey
andLedgerEntry
are deep structures (containsScVal
). Cloning them can be very expensive. Also in order to properly charge the cloning to the budget.MeteredClone
needs to be implemented for them and all their substructures, which adds bloating to the code.Known limitations
[TODO or N/A]