Skip to content

perf: optimize EvaluatorWithHooks #73

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

Merged

Conversation

yuzawa-san
Copy link
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

none

Describe the solution you've provided

  • reduce calls to size()
  • presize collection
  • only wrap non-empty maps

Describe alternatives you've considered

non

Additional context

i was doing some flame graph analysis and found this tiny hotspot

@yuzawa-san yuzawa-san requested a review from a team as a code owner June 17, 2025 22:27
@yuzawa-san yuzawa-san changed the title optimize EvaluatorWithHooks perf: optimize EvaluatorWithHooks Jun 17, 2025
@tanderson-ld
Copy link
Contributor

Thank you for the contribution. I will review and either comment or approve/merge.

@tanderson-ld tanderson-ld merged commit 6b42592 into launchdarkly:main Jun 20, 2025
14 of 16 checks passed
tanderson-ld pushed a commit that referenced this pull request Jun 25, 2025
🤖 I have created a release *beep* *boop*
---


##
[7.9.1](launchdarkly-java-server-sdk-7.9.0...launchdarkly-java-server-sdk-7.9.1)
(2025-06-20)


### Performance Improvements

* optimize EvaluatorWithHooks
([#73](#73))
([6b42592](6b42592))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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