F64116045 opened a new pull request, #11091:
URL: https://github.com/apache/ozone/pull/11091

   ## What changes were proposed in this pull request?
   
   `OmKeyInfo.verifyAndGetKeyLocations()` calls `createLocationList()` only to
   iterate over the existing block locations and populate
   `allocatedBlockLocations`.
   
   This change iterates over `getLocationLists()` directly, avoiding the
   intermediate flattened list without changing the resulting block map.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16252
   
   ## How was this patch tested?
   
   A local JMH benchmark compared the affected loop with 1, 16, and 128
   locations split across 1 or 4 internal lists.
   
   | Locations / lists | `createLocationList()` | `getLocationLists()` |
   |---:|---:|---:|
   | 1 / 1 | 544 B/op | 160 B/op |
   | 1 / 4 | 808 B/op | 160 B/op |
   | 16 / 1 | 1,624 B/op | 1,056 B/op |
   | 16 / 4 | 1,888 B/op | 1,056 B/op |
   | 128 / 1 | 12,280 B/op | 9,904 B/op |
   | 128 / 4 | 12,544 B/op | 9,904 B/op |
   
   JMH 1.37, OpenJDK 17.0.17, 1 thread, 2 forks, `-prof gc`.
   


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