Supplier Model and Performance

Are there any performance implications using a provider template?

Does this rely on reflection for each instance or something else?

+3
source share
2 answers

Yes, the provider model usually includes a small number of reflections, and therefore there will be few performance hits, however this is only in creating the provider object. As soon as an object is created, it gets access as usual (usually through an interface). Performance compared to a hard-coded model should have very little difference, but the gain obtained from a programming point of view far exceeds any penalty for performance. Assuming the provider can really change one day. If not, just copy it.

+5
source

. , , . , - .

+1

All Articles