Your codebase is not slow because of junior mistakes.
 It is slow because of patterns everyone approved.
Clean abstractions. Cute builders. Stream pipelines that felt “elegant”.
 All green in review. All deadly in production.
We watched p95 climb, CPU sit half idle, and throughput stall long before the system should have hit its limit.
Nothing obvious was broken. Nothing threw errors. The service just could not breathe under real load.
Let’s walk through the seven silent killers.
1. Layered DTO Mapping on Every Request
We thought we were being disciplined. Request comes in, map it to an input DTO. Convert that to a domain model.
Convert again for downstream partner. Nothing leaks between layers. Everything “clean.”
Here’s what that purity actually looked like:
public PartnerPayload toPartnerPayload(IncomingOrder in) {
    OrderDto dto = inboundMapper.map(in);          // alloc
    DomainOrder dom = domainMapper.map(dto);       // alloc
    PartnerPayload out = partnerMapper.map(dom);   // alloc
    return out;
}
Learn more about 7 Java Patterns That Passed Code Review and Wrecked Throughput