aptos-core
aptos-core copied to clipboard
Update aptos_debugger.rs
Manage Vector Slices Efficiently, Collect Transaction Info Efficiently
Type of Change
Performance improvement
Which Components or Systems Does This Change Impact?
Other (specify)
Manage Vector Slices Efficiently: Instead of cloning txns in each iteration, slices and indices are used to handle transactions efficiently. Collect Transaction Info Efficiently: txn_infos.drain() is used directly to collect the relevant transaction information. Improve Variable Naming: Renamed ret to results for clarity. Comments and Readability: Added comments and improved readability to make the code easier to understand.