Commit 16ad60f
compute: hoist the flat_map decode arena out of the per-row closure (#37113)
## What
`ArrangementFlavor::flat_map` and `flat_map_ok` constructed a fresh
`RowArena::new()` *inside* the per-row `logic` closure, so an arena was
allocated and dropped on every row processed. This hoists the arena to
the
enclosing scope and `clear()`s it once per row instead, reusing its
allocation
spine across invocations.
## Why
Addresses post-merge review feedback from @antiguru on #37110 (the
`ExtendDatums` refactor): the arena is the caller-provided decode target
a
compressed row representation decodes into. With per-column arrangement
codecs
(follow-up #37111) each row actually populates the arena, so
reallocating it per
row would churn; clearing-and-reusing keeps the spine.
Note that `RowArena::clear()` today drops the inner per-value `Vec<u8>`
buffers
(it clears the outer `Vec<Vec<u8>>`), so this reuses the outer spine but
not the
individual buffers — recycling those is a separate, larger `RowArena`
change.
## Tests
No behavior change; existing `compute` tests cover these paths.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ff4065d commit 16ad60f
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
321 | 325 | | |
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
325 | 329 | | |
326 | 330 | | |
327 | | - | |
328 | | - | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| |||
379 | 382 | | |
380 | 383 | | |
381 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
382 | 389 | | |
383 | | - | |
384 | | - | |
| 390 | + | |
385 | 391 | | |
386 | 392 | | |
387 | 393 | | |
| |||
0 commit comments