-
Notifications
You must be signed in to change notification settings - Fork 110
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
DataRef
: borrow for great perf
#434
Conversation
417a012
to
99ceab0
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.
A few small suggestions, but otherwise this is great. Would you be able to upload a before and after flamegraph to show the improvements?
I have these flamegraphs, but I don't have a good way to upload them - the |
Uploading before and after screenshots of some flamegraphs that @gefjon generated. |
39ffcf6
to
25c43f5
Compare
25c43f5
to
7d67701
Compare
…_table` (#436) * optimize delete, drop, rename * address review comments * even less cloning * more refactoring
7d67701
to
2f6e703
Compare
|
||
Ok(count) | ||
let count = stdb.delete(tx, table_id, rows_to_delete); | ||
NonZeroU32::new(count).ok_or(NodesError::ColumnValueNotFound) |
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.
I believe this introduced the new log lines we are discussing.
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.
Ah so we don't want this to be an error? Easy enough to return an u32
instead and remove line 164.
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.
Fixed in #539.
Description of Changes
Get rid of the old
DataRef
so that it instead borrows theDataKey
andProductValue
.Then this is used throughout so that
iter
,iter_by_col_eq
,table_name_from_id
, and friends, do not.clone()
and instead just returns or works off of borrowed data.API and ABI
If the API is breaking, please state below what will break
Expected complexity level and risk
2