inversify / InversifyJS

A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
http://inversify.io/
MIT License
11.02k stars 712 forks source link

Container takes a long time to instantiate #1524

Closed mravey closed 10 months ago

mravey commented 11 months ago

My container takes approximately 200ms to instantiate. The issue is that I instantiate a new one for each request, it allows me to inject a context with the current logged in user everywhere I want. Is there a way to speed up container instantiation or something I am doing wrong? Or is there another way to achieve what I want ?

simhnna commented 10 months ago

I'm also creating containers per request and they definitely don't take that long. Are you sure that container creation is the issue here?