Closed vitkuzmenko closed 3 months ago
When streaming, the use of outputBuffer.removeFirst(data.count) does not effectively free memory, which can lead to inefficiencies.
outputBuffer.removeFirst(data.count)
Based on advice from an Apple Engineer, I replaced removeFirst with removeSubrange to optimize memory usage.
removeFirst
removeSubrange
Thank you! Merged
Context
When streaming, the use of
outputBuffer.removeFirst(data.count)
does not effectively free memory, which can lead to inefficiencies.Change
Based on advice from an Apple Engineer, I replaced
removeFirst
withremoveSubrange
to optimize memory usage.Before
After