SpryFox/DarkConfig

Investigate code generation solutions, or other ways to speed up object creation

grahamboree opened this issue · 1 comments

On some platforms, the reflection overhead associated with reification is significant. Specifically, the overhead of creating an object and setting fields on it via reflection APIs.

A possible solution here is to generate typed object-creation code from a reflection cache. This would allow DarkConfig to create objects and set values on them without using reflection. It would also slow down the iteration process, since a bunch of code would need to be generated and compiled.

Generally this feature needs more thought, but given how bad the reflection overhead is on some platforms, it's well worth the effort to investigate