-
Notifications
You must be signed in to change notification settings - Fork 315
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: avoid one in memory copy for unsealing #1401
Conversation
fa40294
to
9ad0024
Compare
This is a memory visualization of a full 32GiB seal lifecycle test using the code from this PR, with For comparison, this is a partial memory visualization of a 32GiB seal lifecycle test on the |
To most directly take advantage of this, we also need the exposed https://github.com/filecoin-project/rust-filecoin-proofs-api/blob/master/src/seal.rs#L843 The EDIT: Still looking at the possibility on this. It may just be recommended that callers don't use EDIT 2: It looks possible to leave the rust-filecoin-proofs-api repo alone and instead re-factor how unseal is called from the filecoin-ffi repo. EDIT 3: Something like this should do it: filecoin-project/filecoin-ffi#162 |
9ad0024
to
0f84d01
Compare
unseal_range is not readily able to be converted, but we should be able to deprecate this call from -api by having unseal call into get_unsealed_range transparently to the caller
395d3cf
to
75c58b1
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.
lgtm (can't approve my own PR)
Refactors extraction to overwrite the provided data, rather than allocating another one.