gabotechs opened a new pull request, #12084:
URL: https://github.com/apache/arrow-rs/pull/12084

   ## Summary
   Stacked on #12083 — only the last commit (`compression.rs`) is new here; the 
diff will shrink to just that once #12083 merges.
   
   - Caches the `lz4_flex` `FrameEncoder` (hash table + block buffers) in 
`IpcWriteContext` and reuses it across `compress_lz4` calls instead of 
allocating a fresh encoder per buffer, mirroring the existing zstd context 
reuse.
   - Pins the frame's block size to 256KB so a reused encoder's block size 
isn't fixed by the first buffer it ever wrote.
   - On error mid-frame, drops the cached encoder so the next call starts fresh.
   
   ## Test plan
   - [x] `cargo test -p arrow-ipc --features lz4` passes, including new 
`test_lz4_compression_reuses_context`
   - [x] Benchmarks added in #12083 show the expected improvement from buffer 
reuse
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to