Try to optimize the Currency.options
extension
#56
Labels
technical debt
Technical solutions which need to be brought up to date
Currency.options
extension
#56
See the respective TODO in
MoneyExts.kt
file where theCurrency.options
extension is declared. Currently the getter for this property always uses the respective Protobuf reflection API over and over whenever the property is read. Ideally the value of this property would need to be cached instead of evaluating it each time. It could be done with a dedicated top-levelHashMap
or something like that, but we can also see if other approaches could be made, e.g. using some code generation facilities.Considering such code generation is not necessarily worth such a little feature though, so we should weigh what solution would be fine here. E.g., IMO code generation might potentially be justified only if it's made as some general feature that would be useful in other similar cases as well.
The text was updated successfully, but these errors were encountered: