-
Notifications
You must be signed in to change notification settings - Fork 184
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
Memory alloc improvements #341
Memory alloc improvements #341
Conversation
Signed-off-by: Moritz Hoffmann <[email protected]>
src/trace/mod.rs
Outdated
target.clone_from(batch.upper()); | ||
target.clear(); | ||
target.extend(batch.upper().iter().cloned()); |
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 a bit surprising as an improvement. I think clone_from()
is supposed to do this already.
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 removed this change as it should be superseded by frankmcsherry/timely-dataflow@7f5b8b7
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.
For posterity: clone_from()
does not do the expected thing; the derived implementation calls clone()
rather than clone_from()
.
Signed-off-by: Moritz Hoffmann <[email protected]>
This commit changes the TraceAgent to keep a buffer for temporary antichains around, which is used for setting the logical and physical compaction. The upside is that it avoids temporary allocations, but on the downside it keeps another antichain around. This should be fine, unless there is a defective use case where the size of the antichain grows significantly and the potentially unused memory will not be reclaimed anymore. Signed-off-by: Moritz Hoffmann <[email protected]>
a2d1d60
to
dc49c33
Compare
Signed-off-by: Moritz Hoffmann <[email protected]>
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.
These look great, thanks!
A collection of small improvements to bypass the memory allocator when possible.