Attribute import time to parsing, validation and database waits
A proposal to increase database concurrency assumes writes dominate, but expensive normalization may already saturate one CPU core.
- Focused work estimate
- 2h + prerequisites
- Priority in the scenario
- Medium
- Engineering practice
- Bottleneck analysis · Instrumentation
Estimated field mix
- Performance engineering60%
- Data engineering40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional wholesaler imports supplier rows into a staging catalog. The current prototype reads the entire file into memory and restarts from zero after a failure. Build the prototype and generated CSV fixture locally before measuring improvements.
Setup prerequisites
- Generate a deterministic 250,000-row synthetic CSV with quoted newlines, invalid records and a stated maximum record size.
- Create a disposable staging database and an import process constrained to 256 MiB; record runtime and available CPU.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- Measure stage service time and time blocked on downstream capacity separately.
- Compare parse-only, parse-plus-validation and complete-import runs using the same input.
- Reconcile accepted and rejected records between stages and identify the supported bottleneck hypothesis.
Implementation constraints
- Use bounded aggregate timing rather than one log entry per record, which would alter the measured workload.
Verification to include
- Inject a known validation delay and show its contribution in the stage report.
- Inject writer delay instead and confirm it appears as downstream wait rather than parser CPU time.
Deliverables
- Stage comparison report and aggregate instrumentation
Rollout and recovery
Use the instrumentation in local benchmarks first; disable it independently if overhead makes comparisons unreliable.
Value of the work
For the engineer: Practice streaming, backpressure, allocation analysis and resumable work while retaining exact import semantics.
For the team: Develop a repeatable import performance and recovery exercise that exposes memory, throughput and data-quality tradeoffs.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.