-
Notifications
You must be signed in to change notification settings - Fork 645
perf: read DataKey instead of recomputing it in subscriptions #276
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
Conversation
e835bb2 to
684258b
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.
Looks good, though I have some suggestions:
| impl DataRef { | ||
| fn new(data: ProductValue) -> Self { | ||
| Self { data } | ||
| fn new(id: DataKey, data: ProductValue) -> 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.
Should this take RowId instead?
| fn new(id: DataKey, data: ProductValue) -> Self { | |
| fn new(id: RowId, data: ProductValue) -> 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.
Do we gain anything from the extra indirection?
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.
From what I could tell, all calls to this function essentially does row_id.0, so I figured this would be slightly more "strongly typed".
5629348 to
6a9c13d
Compare
) Fixes #259 (1) Updates MemTable to use RelValue instead of ProductValue (2) Adds a DataKey member to DataRef and RelValue (3) Subscriptions compute DataKey only when not present on row
e9c4a59 to
dba0b96
Compare
Description of Changes
Re-introduces the changes of #268 with a fix for improperly decoding the DataKey.
The original patch tried to encode a byte slice in
to_mem_tableusingDataKey::from_datarather thanDataKey::decode. The former assumes the byte slice is data only, the latter assumes it is a proper DataKey encoding.Tested against #258
API and ABI
If the API is breaking, please state below what will break