he1l0world opened a new pull request, #11048:
URL: https://github.com/apache/cloudstack/pull/11048

   ### Description
   
   This PR improves the performance and clarity of the `getConfigResources` 
method in the `ModuleDefinitionSet` class.
   
   Previously, getConfigResources traversed the entire module hierarchy on each 
call, redundantly re-computing inherited context resources from parent modules. 
This change introduces a recursive post-order traversal approach with 
memoization using a configResourcesMap. The result is a more efficient and 
maintainable implementation, especially as the number of modules grows.
   
   The work builds upon [PR 
#11042](https://github.com/apache/cloudstack/pull/11042), which added unit test 
coverage for this method. With tests in place, this change now optimizes the 
implementation while maintaining the same expected behavior.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [X] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   Verified using the unit tests introduced in [PR 
#11042](https://github.com/apache/cloudstack/pull/11042)
   
   #### How did you try to break this feature and the system with this change?
   Verified that duplicate traversal across inherited modules no longer occurs
   


-- 
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]

Reply via email to