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

HDDS-11649. Recon ListKeys API: Simplify filter predicates #7395

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

sodonnel
Copy link
Contributor

@sodonnel sodonnel commented Nov 5, 2024

What changes were proposed in this pull request?

In the Recon ListKeys API, a series of predicate lambdas are created to filter the returned keys. The filters create 3 new lambdas for each key to check and this api could iterate a lot of keys in parallel.

Benchmarking the original code against simple IF statements shows the IF statements to be about 3x faster. However the creation of all the lambda object resulted in about 4500MB/s of short lived objects.

This PR simplifies the code to IF statements. It should not change any functionality.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11649

How was this patch tested?

Existing tests cover this.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @sodonnel for the simplification, LGTM.

…/api/OMDBInsightEndpoint.java

Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com>
@sodonnel sodonnel merged commit 0415c0b into apache:master Nov 6, 2024
40 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