Why architecture matters here
Dedup fails on wrong workload + CPU overhead. Architecture matters because dedup + interning + alternatives compose.
Advertisement
The architecture: every piece explained
The top strip is basics. String allocation. G1 string dedup. Compact strings. intern().
The middle row is tradeoffs. Dedup table. Cost. Metrics. Alternatives.
The lower rows are ops. String pool sizing. GC impact. Ops — tuning + measurement.
Advertisement
End-to-end flow
End-to-end: log-heavy app with many duplicate strings. G1 dedup enabled. Compact strings default. Dedup rate 12%, saving 250MB heap. GC pauses shorter.