Skip to content

perf(table): reuse partition projections across planning phases - #1965

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:perf/reuse-partition-projections
Open

perf(table): reuse partition projections across planning phases#1965
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:perf/reuse-partition-projections

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What

  • Reuse the per-spec partition projection cache across local planning phases.
  • Manifest-summary pruning and manifest-entry pruning now share the same projections.
  • Incremental append planning uses the same cache too.

Why

PlanFiles was building the same projection once while filtering manifests and again while filtering manifest entries. The schema, filter, and partition spec are unchanged between these phases, so the second phase can reuse the result.

The cache stays scoped to one planning operation.

Benchmark

Apple M1 Pro:

  • 256 partition specs: 1.93 ms/op -> 1.55 ms/op
  • Allocations: 2.56 MB/op -> 2.19 MB/op
  • Projection builds: 512/op -> 256/op

Command:

go test ./table -run "^$" -bench BenchmarkPartitionProjectionPlanning -benchtime=500ms -count=5

Tests

  • go test ./table -count=1
  • go test -race ./table -count=1
  • Full non-cloud package test sweep
  • golangci-lint run --timeout=10m

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.

1 participant