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

Improve performance for working with indices #21195

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

fpetersen-gl
Copy link
Contributor

Description

Don't iterate over all IndexSets for a given indexName, instead use getForIndex(String) directly to avoid unnecessary calls. Also converted some loops to streaming for further cleanup of the code.

Motivation and Context

Fixes issue #18563.

How Has This Been Tested?

There's an new test to simulate having 500 IndexSets and checking if only the one responsible for a given specific index is being called.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

… instead use `getForIndex(String)` directly. Also converted some loops to streaming.
@CLAassistant
Copy link

CLAassistant commented Dec 16, 2024

CLA assistant check
All committers have signed the CLA.

@patrickmann
Copy link
Contributor

Needs a changelog or /nocl directive.
Since the PR doesn't really change functionality or user-visible behavior, I would go with /nocl.

@fpetersen-gl
Copy link
Contributor Author

I see, thanks for the pointer!
Just to confirm: "user-visible behavior" means only changes in the UI? Because at least the reporter of the bug should see (or rather feel) a difference.

Copy link
Contributor

@patrickmann patrickmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice first issue - it's my pleasure to merge your first PR

@patrickmann patrickmann merged commit 7845ab9 into master Dec 18, 2024
6 checks passed
@patrickmann patrickmann deleted the bugfix/18563_query_fewer_indices branch December 18, 2024 07:21
@HenryTheSir
Copy link

Hi @bernd ,

can we get a backport of this fix to 6.1?

Thanks!

garybot2 pushed a commit that referenced this pull request Feb 25, 2025
* Issue #18563: Don't iterate over all IndexSets for a given indexName, instead use `getForIndex(String)` directly. Also converted some loops to streaming.

* Add changelog

* Review comments

* Review comments part two

(cherry picked from commit 7845ab9)
patrickmann pushed a commit that referenced this pull request Feb 26, 2025
* Improve performance for working with indices (#21195)

* Issue #18563: Don't iterate over all IndexSets for a given indexName, instead use `getForIndex(String)` directly. Also converted some loops to streaming.

* Add changelog

* Review comments

* Review comments part two

(cherry picked from commit 7845ab9)

* Added PR for backport to 6.1 to the list of PR's

---------

Co-authored-by: Florian Petersen <[email protected]>
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.

4 participants