orca-07 commented on PR #11089: URL: https://github.com/apache/ozone/pull/11089#issuecomment-5386668940
@chungen0126 Thanks for the suggestion. I ran an on-demand microbenchmark that isolates the changed traversal, comparing `createLocationList().stream()` with `getLocationLists().stream().flatMap(List::stream)`. A representative run produced: | Lists | Blocks/list | Blocks | createLocationList (ns/op) | getLocationLists (ns/op) | Speedup | | ---: | ---: | ---: | ---: | ---: | ---: | | 1 | 10 | 10 | 806.2 | 313.6 | 2.57x | | 1 | 100 | 100 | 923.8 | 282.4 | 3.27x | | 10 | 10 | 100 | 678.9 | 171.1 | 3.97x | | 10 | 100 | 1000 | 5631.8 | 1085.6 | 5.19x | The benchmark isolates the traversal overhead introduced by creating the temporary flattened list and does not measure the full `getBlocksForKeyDelete()` path. I also repeated the benchmark and observed the same direction across the tested configurations. Would you prefer this isolated comparison, or a benchmark covering the full block conversion path in `getBlocksForKeyDelete()`? -- 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]
