Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Performance

Vladislav Kantaev edited this page Apr 25, 2021 · 2 revisions

Benchmark description

50 instances were instantiated from a prefab in one frame in order to measure the overhead of the framework. The prefab has relatively deep hierarchy with different components referencing one another. All of them support two modes: manual resolution and DI.

Results

No DI

No DI

DI

DI

Baked DI

Baked DI

As bar charts

Time is taken from the Instantiate.Awake sample as Time ms - Self ms (to extract only the time that is spent on Awake's and resolution).
Bar Graph Time Bar Graph GC

Observations

  • No DI is the best in both categories (but it is less convenient and maintainable, so there is a tradeoff)
  • DI is ~5 times slower than No DI
  • But Baked DI is only ~3 times slower than No DI
  • GC allocations are the same for both DI and Baked DI and are twice as in No DI

Clone this wiki locally