The use of a DI container comes with a certain increase of memory pressure. This happens because the container must be informed about all registrations and their metadata. This metadata will be kept into memory for the duration of the application and will increase almost constantly with the number of registrations in the application.
All DI containers have this cost and increased memory pressure compared to Pure DI is inevetable. With Simple Injector every registration causes some extra memory that will be kept allocated as long as the container instance is referenced (which usually is for the duration of the application).
For each registration Simple Injector will hold the following information in memory:
This can easily lead up to around 300 bytes per registration. This is memory that will keep referenced until the application stops.
Simple Injector is already highly tuned but we might do even more to prevent memory pressure. We should investigate how we can reduce pressure as much as possible.
Currently, the overhead is somewhere between 380 and 400 bytes per unique registration.