Skip to content

Conversation

@belugabehr
Copy link
Contributor

Replaces ArrayList copy with Arrays.asList approach to reduce heap allocations when retrieving meters.

Closes gh-7035

Replaces ArrayList copy with Arrays.asList approach to reduce heap
allocations when retrieving meters.

Closes micrometer-metricsgh-7035
shakuzen added a commit that referenced this pull request Dec 31, 2025
Gets rid of an extra copy, which generates garbage for no benefit.
The new implementation is at least as performant as the previous one while generating approximately half the garbage.

Resolves gh-7035
Supersedes gh-7040
@shakuzen
Copy link
Member

Superseded by a10492b

@shakuzen shakuzen closed this Dec 31, 2025
allnightlong pushed a commit to allnightlong/micrometer that referenced this pull request Jan 19, 2026
Gets rid of an extra copy, which generates garbage for no benefit.
The new implementation is at least as performant as the previous one while generating approximately half the garbage.

Resolves micrometer-metricsgh-7035
Supersedes micrometer-metricsgh-7040
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.

Improve efficiency of MeterRegistry#getMeters

2 participants