-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.The issue is fixed.
Description
StringBuilder marshalling always re-allocate/re-copy buffers. Make sense review our code to reduce such allocations.
From @daxian-dbw #9066 (comment)
it seems StringBuilder should never be used for P/Invoke as it incurs 4 allocations. I think it make sense to review our uses of it and replace with ArrayPool when appropriate, because we will copy the existing pattern when writing new code.
From above docs:
[USE] Char arrays from ArrayPool or StringBuffer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.The issue is fixed.