ninject/ninject — pull request #102 by Plasma (2013-09-20 05:53:42+00:00)
Title: Improve Ninject performance with ConcurrentDictionary

This issue is in reference to #84 and #97

Profiling has shown contention around Resolve() and other methods that use write locks can cause real-world performance problems. This PR introduces the concept of ConcurrentDictionaryEx which is backed by a ConcurrentDictionary when supported on the platform (> .NET 3.5) or a regular Dictionary protected by a write lock otherwise.

Under load on a landing page that has several transient dependencies injected I was able to go from 526 requests/sec to 800 requests/sec.

Unfortunately this does not eliminate the performance impact of Ninject that isn't just superficial.

The Resolve() and GetBindings() methods appear to be quite intensive under load.