We have a production web application (ASP.NET MVC). The application was developed 2 years ago and used Ninject as DI Container.
Looking at performance results, we got motivated to replace Ninject with LightInject. We have done that in other small web application before so were confident that there won't be any technical roadblocks.
In a separate code branch, we made changes and replace Ninject with LightInject successfully. The web application is running properly utilizing LightInject as a DI container.
Now comes the interesting part, what did we gain?
So I thought to perform a quick (non scientific) performance analysis. So I used Prefix (which is fantastic tool) on my development box and captured timings manually running both version of web app. Ran each page 10 times ignoring first run and average time.
The results are not so encouraging and made me wonder why?
I think there could be following possibility for these results:
- Less number of UI pages measured.
- Performance measure technique used is manual and not scientific.
- The way we have used DI Container in web app, it does not matter much whether to use Ninject or LightInject. If this is the case, we do not want to replace it (as replacement affects full application). To establish this, we need more scientific results.
I thought to use Prefix on server but we host in AWS Elastic Beanstalk.
I just need some performance matrix to establish whether it is worth to switch to LightInject in our case.
Any suggestion on this?