Skip to content

Lookups on configs with fallback are performing merge and allocations each time #195

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

Closed
IgorFedchenko opened this issue Jan 24, 2020 · 0 comments · Fixed by #199
Closed
Milestone

Comments

@IgorFedchenko
Copy link
Contributor

We have a Root property in config, which is evaluated each time it is accessed, and getter is performing merging of all fallbacks into single config to use for lookup.

This Root is used in all lookups, so each lookup is performing lots of merging and allocations when there are lots of fallback values with lots of keys.

Since configs are immutable by design, should evalutate Root only once after fallback is added. So there will be only one allocation on new config creation, and lookups will be cheap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants