You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently a LazyOption type, which behaves as an Option but it would be beneficial to just have a lazily loaded value where the assertion that a value is always stored is kept (stored on initialization and errors if not found) instead of leaving to developers to check/unwrap in code.
Side benefit of this (and lazy option) is to have the values and changes cached to avoid duplicate reads/writes to storage, similar to what is being explored with #402. This would be a good candidate for using oncecell@matklad might have thoughts as to if there is overhead that won't be acceptable in this context (there are some thread blocking components which I'm not sure how it fits into the wasm smart contract env) or re-using the cache primitive from #402.
This caching change can also be applied to LazyOption but likely all changes would live under the unstable flag.
cc @evgenykuzyakov as this was related to what I asked about in contract review
The text was updated successfully, but these errors were encountered:
There is currently a
LazyOption
type, which behaves as anOption
but it would be beneficial to just have a lazily loaded value where the assertion that a value is always stored is kept (stored on initialization and errors if not found) instead of leaving to developers to check/unwrap in code.Side benefit of this (and lazy option) is to have the values and changes cached to avoid duplicate reads/writes to storage, similar to what is being explored with #402. This would be a good candidate for using
oncecell
@matklad might have thoughts as to if there is overhead that won't be acceptable in this context (there are some thread blocking components which I'm not sure how it fits into the wasm smart contract env) or re-using the cache primitive from #402.This caching change can also be applied to
LazyOption
but likely all changes would live under theunstable
flag.cc @evgenykuzyakov as this was related to what I asked about in contract review
The text was updated successfully, but these errors were encountered: