Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to optimize the Currency.options extension #56

Open
dpikhulya opened this issue Oct 12, 2024 · 0 comments
Open

Try to optimize the Currency.options extension #56

dpikhulya opened this issue Oct 12, 2024 · 0 comments
Labels
technical debt Technical solutions which need to be brought up to date

Comments

@dpikhulya
Copy link
Contributor

dpikhulya commented Oct 12, 2024

See the respective TODO in MoneyExts.kt file where the Currency.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-level HashMap 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.

@dpikhulya dpikhulya added the technical debt Technical solutions which need to be brought up to date label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Technical solutions which need to be brought up to date
Projects
None yet
Development

No branches or pull requests

2 participants