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

Reduce repetitive Theme.of() calls #438

Merged
merged 1 commit into from
Dec 2, 2022
Merged

Reduce repetitive Theme.of() calls #438

merged 1 commit into from
Dec 2, 2022

Commits on Dec 2, 2022

  1. Reduce repetitive Theme.of() calls

    It's not an expensive call, but not free either. Every `Theme.of()` call
    implies a `Localizations.of()` call, both of which are basically hashmap
    lookups. Last but not least, the two are merged and cached, resulting in
    a third hashmap lookup. Therefore it's nice to store it to a variable in
    the beginning of `build()` to avoid doing all three hashmap lookups every
    time the theme is accessed.
    jpnurmi committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    a8234ff View commit details
    Browse the repository at this point in the history