[DiscordArchive] Is the cost of injection not only on startup wiring up the dependencies?
[DiscordArchive] Is the cost of injection not only on startup wiring up the dependencies?
Archived author: stoneharry • Posted: 2023-09-01T17:03:29.370000+00:00
Original source
Is the cost of injection not only on startup wiring up the dependencies?
Archived author: stoneharry • Posted: 2023-09-01T17:03:49.473000+00:00
Original source
We use it primarily for high availability, where we can swap dependencies in/out at runtime and replace services that have died
Archived author: Pursche • Posted: 2023-09-01T17:04:40.565000+00:00
Original source
The issue with dependency injection is that now you're essentially calling function pointers instead of hardcoded functions, so the compiler can't know what you're calling when it's doing compiletime optimizations
Archived author: <o> • Posted: 2023-09-01T17:05:27.019000+00:00
Original source
pretty much that, anything virtual is very bad in games because it pollutes everything
Archived author: <o> • Posted: 2023-09-01T17:07:33.382000+00:00
Original source
you can do a lot of that with compile-time flags and such as well, but you need very different approaches compared to when you can take virtual and things like space for an extra pointer for granted
Archived author: <o> • Posted: 2023-09-01T17:10:00.441000+00:00
Original source
game systems are also, more-so than other systems, a complete clusterfuck where everything interacts with everything by design and on purpose, so the value of mocks degrade very rapidly
Archived author: stoneharry • Posted: 2023-09-01T17:11:42.457000+00:00
Original source
Aye, you sacrifice a lot of performance for maintainability / readability / productivity etc in most enterprise software. Game dev is a fairly unique space.