Commit 1c761b5
docs(pipeline): document max_workers regression on small chunks
Added a Notes section to _resolve_max_workers explaining when threading
helps and when it hurts:
- Large chunks (>= 1 MB): threading helps, default is right
- Small chunks (<= 64 KB): per-task pool overhead (~30-50us) dominates
the per-chunk work, threading slows things down 1.5-3x
- Workaround: codec_pipeline.max_workers=1 for small-chunk workloads
Approximate breakeven: 256-512 KB per uncompressed chunk. Compressed
chunks shift the threshold lower because decode is real CPU work.
No code change. Wiring an automatic threshold is deferred — 1 MB is a
typical chunk size and a hard cutoff would catch legitimate workloads.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent faf44a0 commit 1c761b5
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
48 | 63 | | |
49 | 64 | | |
50 | 65 | | |
| |||
0 commit comments