Repository navigation
Commit e346776
perf(contrib-delta) P7m: O(1) partition-value lookup in build_delta_partitioned_files
Perf-audit apache#137 finding #1. The inner `partition_schema.fields()` loop was
calling `.iter().find()` on `task.partition_values` for every field --
O(width × values) per task. Pre-build a per-task HashMap<&str, &str> once,
then O(1) gets. The map is reused across tasks via clear() so the allocation
amortises across all DeltaScanTasks in the scan.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent a805f81 commit e346776
1 file changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
| |||
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
128 | 140 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 141 | + | |
| 142 | + | |
135 | 143 | | |
136 | 144 | | |
137 | 145 | | |
| |||
0 commit comments