7

I would like to use some .NET IoC container with good performance results. I read this article about IoC containers performance and DryIoc and LightInject seem to be the best. But I did not find some reviews of them especially some experiences from the real using.

  • Do you have some experiences with DryIoc and LightInject?
  • What IoC container would you recommend for the performance sensitive project?
y0j0
  • 3,369
  • 5
  • 31
  • 52
  • 7
    I suspect this question to be subjective and not a very good fit for Stackoverflow. But do note though that for most applications the performance of your DI library is not an issue (the bottleneck is usually in I/O). I'm the creator of [Simple Injector](https://simpleinjector.org) and Simple Injector is in the top 4 of fastest containers in the article you linked to. So I think you can take my word for it. And even if performance is important, there are many more criteria to choose from when selecting your DI library. – Steven Aug 11 '14 at 15:03
  • I'm aware of this is maybe subjective question, but I'm asking for a concrete experience not a feeling, so that's the reason why I risked to ask:) Thank you for your proposal, your IoC container looks nice and simple to use. I will look at it. – y0j0 Aug 11 '14 at 15:52
  • Some definition of "performance sensitive project" is likely needed. All projects want "to go fast" most projects don't have true performance concerns outside of IO. – Chris Marisic Apr 13 '15 at 16:16
  • Before making concrete suggestions and adhering to a specific IoC container please make a try outs with following and make a decision that potentially suits your needs [StructureMap](http://docs.structuremap.net/) [Spring.Net](http://springframework.net/) – Nandha Kumar Apr 15 '15 at 09:38

2 Answers2

0

I decided to use LightInject in middle-size project and I was very satisfied with all features, documentation and support. I recommend to use LightInject.

y0j0
  • 3,369
  • 5
  • 31
  • 52
  • I am interested in this topic for similar reasons as I am considering replacing a current "poor man's" implementation of DI with an IoC container in a real-time trading application. Obviously in such a context performance is absolutely critical. I too was looking at DryIoc and LightInject. Any further details of your experiences would be beneficial. Thanks. – 0b101010 May 29 '15 at 20:03
  • Hi. And which IoC container did you choose? I didn't do some performance tests of LightInject but I used it in middle size project and it works without any problems. It was mainly CRUD application and read/write actions took most of time. Maybe this is reason why I didn't see performance problem. I think replace of the IoC container is not big deal, try to replace your current IoC for Lightinject and you will see. Write me please info then. – y0j0 Jun 01 '15 at 13:28
0

LightInject doesn't resolve concrete classes that was not registered within container. You can provide fallback method (RegisterFallback), but resolving dependency in it using same container causes StackOverflowException.

Nogard
  • 36
  • 4