Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kilink
Copy link
Member

@kilink kilink commented Sep 21, 2024

Properly size the LinkedHashMaps in the createState method to avoid rehashing / resizing. Additionally, if instrumentation is not enabled, just use the singleton empty map.

To facilitate this change, add an Iterables utility class with a "size" helper to determine the size of the passed in Iterable; this is necessary because the Config::keys method returns Iterable, but in practice is typically a Collection.

Finally, add a marker annotation, Internal, to indicate classes such as Maps and Iterables that are not meant to be used by users of Archaius and may not have stable APIs.

Properly size the LinkedHashMaps in the createState method to avoid rehashing / resizing.
Additionally, if instrumentation is not enabled, just use the singleton empty map.

To facilitate this change, add an Iterables utility class with a "size" helper to determine
the size of the passed in Iterable; this is necessary because the Config::keys method returns
Iterable, but in practice is typically a Collection.

Finally, add a marker annotation, Internal, to indicate classes such as Maps and Iterables that
are not meant to be used by users of Archaius and may not have stable APIs.
@kilink kilink force-pushed the private-view-config-map-resizing branch from 2e1aa8f to 6dadc2e Compare September 21, 2024 18:52
@rgallardo-netflix rgallardo-netflix merged commit e9bbde9 into 2.x Sep 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants