msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Users/tevinstanley/allocatelistsizecorrectly

Open ttstanley opened this issue 5 months ago • 0 comments
trafficstars

Fixes #

Context

On traces we could see about & mb of allocations due to add nonempty strings. When taking it look at the code we could see alot of adding to a list which was constantly resizing. image

Changes Made

Instead of defaulting a list of default size we use context to initialize the size to be something closer to what we would like. So that the capacity only needs to be set once.

Testing

Notes

ttstanley avatar Jun 17 '25 00:06 ttstanley