Skip to content

LUCENE-9687: Hunspell suggestions: reduce work in the findSimilarDictionaryEntries loop #2451

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
merged 1 commit into from
Mar 4, 2021

Conversation

donnerpeter
Copy link
Contributor

Description

The loop is called a lot of times, and some allocations and method calls can be spared

Solution

Extract some code outside the loop

Tests

No new tests, ~5% speedup in TestPerformance.en_suggest

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the master branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Ref Guide (for Solr changes only).

…ionaryEntries loop

The loop is called a lot of times, and some allocations and method calls can be spared
@donnerpeter
Copy link
Contributor Author

Sorry, I couldn't create a separate JIRA issue for this change due to some "XSRF Security Token Missing" error in JIRA

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