ashiijo opened a new pull request, #3074:
URL: https://github.com/apache/helix/pull/3074

   ### 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
   <img width="1453" height="543" alt="Screenshot 2025-10-30 at 3 14 45 PM" 
src="https://github.com/user-attachments/assets/a4dafd12-7473-4849-bcd8-fb2d783ef9b2";
 />
   modified to remove expensive HashSet init, which allocates separate memory 
and copies all data to the new set
   
   2. Cache per partition calculations for Partition comparator instead of 
re-calculating for every run
   <img width="1456" height="451" alt="Screenshot 2025-10-30 at 3 16 44 PM" 
src="https://github.com/user-attachments/assets/d327723f-2fbc-4a2f-aa3c-fcaa286ab324";
 />
   
   3. Improve deepcopy during partition comparator init, remove unnecessary use 
of streams which adds overhead
   <img width="1457" height="470" alt="Screenshot 2025-10-30 at 3 18 06 PM" 
src="https://github.com/user-attachments/assets/9bf55240-19a5-47e1-b252-d2aa30d93d57";
 />
   
   4. Remove unnecessary anymatch operation which creates stream and causes 
overhead, also remove .contains() use, and rely on equals
   <img width="1466" height="349" alt="Screenshot 2025-10-30 at 3 19 16 PM" 
src="https://github.com/user-attachments/assets/6e7a0692-cec2-48fa-8e5d-a46b8d89d597";
 />
   
   
   ### 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](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. 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)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to