Skip to content

perf(table): precompute data writer invariants - #1813

Merged
zeroshade merged 2 commits into
apache:mainfrom
fallintoplace:perf/precompute-data-writer-invariants
Aug 17, 2026
Merged

perf(table): precompute data writer invariants#1813
zeroshade merged 2 commits into
apache:mainfrom
fallintoplace:perf/precompute-data-writer-invariants

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

  • Precompute the stats plan, current partition spec, Parquet row-group size, write properties, schema options, and file extension when the writer is created.
  • Reuse those values for every write task.
  • Add a focused writer benchmark.

Benchmark

Apple M1 Pro, GOMAXPROCS=1, median of 5 runs with -benchtime=1s:

  • origin/main: 8.53 us/op, 97 allocs/op, 6.49 KB/op
  • this branch: 6.38 us/op, 72 allocs/op, 5.01 KB/op
  • about 1.34x faster and 26% fewer allocations

The benchmark uses a no-op file format so it measures the per-task writer setup and schema conversion without filesystem or Parquet I/O.

Tests

  • go test ./...
  • go test -race ./table/...
  • go vet ./table/...

@zeroshade

Copy link
Copy Markdown
Member

Since this is a draft, i'll hold off on further review until it's marked ready

@fallintoplace
fallintoplace marked this pull request as ready for review August 17, 2026 21:29
@zeroshade
zeroshade merged commit f81912d into apache:main Aug 17, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants