My favorites | Sign in
Logo
                
Search
for
Updated Dec 12, 2007 by nicholas.blumhardt
ImprovingPerformance  
Tips for getting the best mileage out of Autofac

Before doing any performance optimisation, always run a profiler like NProf and track the issue down.

If you do need to squeeze extra performance out of Autofac, your best bet is to identify the most frequently-created components and register them using an expression rather than by type, e.g.:

builder.Register<A>();

Becomes:

builder.Register(c => new A());

This can yield an improvement of up to 10x faster Resolve() calls.


Sign in to add a comment
Hosted by Google Code