Commit 18193a0
perf(proton): remove per-row mutex lock around batched.Append()
The ds.Context.Lock()/Unlock() around batched.Append(row...) was unnecessary:
- batched is a local object created in the operation closure
- batchRows is a local snapshot fully drained from the channel
- No concurrent goroutine accesses either during the append loop
This saved 1.66M mutex lock/unlock cycles.
Benchmark (localhost, 1.66M rows, batch_limit=50K, cumulative):
Baseline: 62s (41.0s user)
+ LZ4: 61s
+ g.Debug removal: 28s (10.5s user)
+ this: 27s ( 9.8s user) ← ~1s improvement
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 60a5ddd commit 18193a0
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
737 | | - | |
| 736 | + | |
738 | 737 | | |
739 | | - | |
740 | 738 | | |
741 | 739 | | |
742 | 740 | | |
| |||
0 commit comments