deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.18k stars 121 forks source link

Usage of ScopedLogger increases start time enormously #494

Closed colorcube closed 10 months ago

colorcube commented 10 months ago

Example Framework APP

Without ScopedLogger

2023-10-24T17:30:57.217Z Start Service (console.log first line) 2023-10-24T17:31:01.394Z [LOG] Start server ...

Start time 4 sec

With ScopedLogger

2023-10-24T17:32:17.896Z Start Service (console.log first line) 2023-10-24T17:33:34.779Z [LOG] Start server ...

Start time 77 sec

Bigger services take even longer to start (3+ min)

marcj commented 10 months ago

Fixed in https://github.com/deepkit/deepkit-framework/commit/8c79e4b1d370c21f12c203a786608b6d39dc5c56

Problem was that injector used an API that doesn't cache when no Type is passed.