Skip to content

aajoshi/improve intermediate calc stage#65

Merged
ashiijo merged 1 commit intodevfrom
aajoshi/improve-intermediate-calc-stage
Nov 21, 2025
Merged

aajoshi/improve intermediate calc stage#65
ashiijo merged 1 commit intodevfrom
aajoshi/improve-intermediate-calc-stage

Conversation

@ashiijo
Copy link
Collaborator

@ashiijo ashiijo commented Oct 30, 2025

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

This PR is for improvement for IntermediateStateCalculationStage
These improvements are made on basis of profiling data acquired -
https://observe.prod.linkedin.com/profiling-explorer/event/2963846

Description

Improvements made -

  1. Remove unnecessary HashSet initialisation
Screenshot 2025-10-30 at 3 14 45 PM modified to remove expensive HashSet init, which allocates separate memory and copies all data to the new set
  1. Cache per partition calculations for Partition comparator instead of re-calculating for every run
Screenshot 2025-10-30 at 3 16 44 PM
  1. Improve deepcopy during partition comparator init, remove unnecessary use of streams which adds overhead
Screenshot 2025-10-30 at 3 18 06 PM
  1. Remove unnecessary anymatch operation which creates stream and causes overhead, also remove .contains() use, and rely on equals
Screenshot 2025-10-30 at 3 19 16 PM

Tests

NA

Changes that Break Backward Compatibility (Optional)

  • My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:

(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)

Documentation (Optional)

  • In case of new functionality, my PR adds documentation in the following wiki page:

(Link the GitHub wiki you added)

Commits

  • My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

@ashiijo ashiijo force-pushed the aajoshi/improve-intermediate-calc-stage branch 2 times, most recently from a3d912f to e254a73 Compare October 31, 2025 05:03
@ashiijo ashiijo changed the base branch from master to dev October 31, 2025 05:06
@ashiijo ashiijo force-pushed the aajoshi/improve-intermediate-calc-stage branch from e254a73 to 7f3d82a Compare October 31, 2025 05:14
Copy link
Collaborator

@ngngwr ngngwr left a comment

Choose a reason for hiding this comment

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

LGTM

@ashiijo ashiijo merged commit a0d0213 into dev Nov 21, 2025
1 of 2 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.

3 participants