-
Notifications
You must be signed in to change notification settings - Fork 631
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
Add helper functions that would create JournalInit from JournaledState #1879 #1961
Add helper functions that would create JournalInit from JournaledState #1879 #1961
Conversation
CodSpeed Performance ReportMerging #1961 will degrade performances by 2.13%Comparing Summary
Benchmarks breakdown
|
crates/context/src/journal_init.rs
Outdated
pub type JournalInit = JournaledState<EmptyDB>; | ||
|
||
impl<DB> From<&JournaledState<DB>> for JournalInit { | ||
fn from(state: &JournaledState<DB>) -> Self { |
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.
This is an expensive operation that clones a lot of fields. would remove it and just add into_init()
and to_init()
functions to JournaledState
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.
thx added that! so to_init() is still cloning similar to the rust from/into convention. I think that is what you wanted?
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
Resolves #1879