-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently processImage does file I/O, decode, and encode sequentially in one function inside a single worker goroutine. Separating into 3 pipeline stages allows each stage to run concurrently and makes bottleneck identification precise.
Scope:
internal/pipeline/reader.go— file open and raw bytes read, outputs to decode channelinternal/pipeline/decoder.go— JPEG/PNG decode from raw bytes, outputsimage.Imageto encode channelinternal/pipeline/encoder.go— WebP encode and file write, outputs Result- Each stage has its own bounded channel and worker count
- Add stage-level metrics: time spent in read vs decode vs encode separately
Architecture:
JobsChan → [Reader goroutines] → rawChan → [Decoder goroutines] → imgChan → [Encoder goroutines] → ResultsChan
Acceptance Criteria:
- Each stage independently configurable in worker count
- Stage timing visible in
summary.jsonunderstage_metrics - Memory profile shows decode buffer reuse across pipeline
- All existing tests pass against new architecture
BENCHMARKS.mdupdated with stage-level timing breakdown
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request