mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
Motivation: the query builder (and within it, replacePropertyNames and associated functions) is pretty CPU intensive. For our workload, it's one of the hottest functions in our entire stack. While improved in https://github.com/typeorm/typeorm/pull/4760, There are still outstanding issues relating to perf e.g. https://github.com/typeorm/typeorm/issues/3857 As we all know though, the first step in optimization is to measure systematically ;) https://wiki.c2.com/?ProfileBeforeOptimizing On my machine, this benchmark runs in ~3500ms or about 0.35ms/query. This tells us there's a way to go - on my stack, that's about 1/3 of a typical query's latency!