perf(arrow-ipc): Avoid copies and write dictionary batches directly to writers when possible - #10128
perf(arrow-ipc): Avoid copies and write dictionary batches directly to writers when possible#10128JakeDern wants to merge 4 commits into
Conversation
|
Pretty good improvement - ~42% for the dictionary case and ~20% for delta dictionary cases. Not 100% sure why less improvement on the delta side yet, but I think this is worth it to take on its own and can investigate further later. Perf results from #10122: perf results from this branch: |
|
CC: @alamb and @Rich-T-kid - I think we got pretty good results here! I also tried to clean up a few things here and there where I could like removing some unnecessary parameter drilling. This has the benchmarks from #10122 as well, will rebase once that goes in. |
|
I can take a look at this early next week. |
Rich-T-kid
left a comment
There was a problem hiding this comment.
I think this PR looks mostly fine. it would be nice to include a round trip test similar to ##10097 that validate that nothing is being broken.
left a couple non-blocking comments. Ill try and take a second pass through tommorow if I can get a chance/ if this is still open
2a21b60 to
f9a0328
Compare
|
Took a little longer than I'd have liked, but I got back to rebasing this and fixing it up. @Rich-T-kid or @alamb would definitely appreciate another look.
We do have some round trip tests for the writer, but if there's anything specific missing here, I'm happy to take a stab at adding it! |
|
Ill try and take another look next week |
|
cc @Phoenix500526 in case your interested @JakeDern could you rebase this branch? I think there are outdated changed in your diff |
|
This may also be related #9775 |
|
run benchmark arrow_writer |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing ipc-writer-collect-dicts (fd9d7c2) to fed7862 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
fd9d7c2 to
2bda004
Compare
I think we're all fixed up now - Nice to see so much IPC activity! |
@alamb I think you meant to run |
|
run benchmark ipc_writer |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing ipc-writer-collect-dicts (2bda004) to 98998a8 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
|
Rich-T-kid
left a comment
There was a problem hiding this comment.
The benchmarks look very good and the PR looks nice. I left a couple of suggestions.
I'd like to take a second look as well! could you update the description to explain the flow between calls a bit more? The arrow-ipc reader/writer code takes a lot of context to keep in mind. 😮💨
Rich-T-kid
left a comment
There was a problem hiding this comment.
Thanks @JakeDern this looks good to me. I left a couple comments, mostly nits.
🚀
|
also with @Phoenix500526's #10277 being merged yesterday we may have to rebase this again |
dcfe3f9 to
e946870
Compare
|
Alright @Rich-T-kid, one more rebase for the books! |

Which issue does this PR close?
Rationale for this change
This is a follow on to #10044, applying basically the same optimization for dictionary batches.
This needs to wait for #10122 before merge.
What changes are included in this PR?
Are these changes tested?
Yes, existing unit tests should cover the change.
Are there any user-facing changes?
No.