Tagged articles

N+1

2 articles · Page 1 of 1
LuTiao Programming
LuTiao Programming
Feb 25, 2026 · Backend Development

Which Entity‑to‑DTO Mapping Is Fastest? Benchmark of 3 Approaches

By benchmarking manual mapping, MapStruct, and JPQL projection across simple and relational scenarios, the article shows that JPQL is slightly faster in raw tests, but the real performance impact stems from N+1 queries, making query strategy the key factor rather than the mapping technique itself.

DTOEntity MappingMapStruct
0 likes · 8 min read
Which Entity‑to‑DTO Mapping Is Fastest? Benchmark of 3 Approaches
Su San Talks Tech
Su San Talks Tech
Dec 30, 2025 · Backend Development

How I Cut Category Tree Load Time from 3 Seconds to 30 Milliseconds

A real‑world performance disaster caused by N+1 queries in a SpringBoot project was solved by replacing recursive database calls with a single batch query, building an in‑memory hash map, and adding multi‑level caching, achieving a 100× speedup and dramatically reducing system load.

CachingN+1Optimization
0 likes · 19 min read
How I Cut Category Tree Load Time from 3 Seconds to 30 Milliseconds