icsharpcode/SharpZipLib

Perf - Add buffer pooling where relevant

thibault-reigner opened this issue · 0 comments

Current situation

Some pieces of code such as InflaterInputStream, through InflaterInputStream, allocate buffers upfront in their constructors, with no way to control this behavior (e.g : passing the buffer to use).
In code making intensive use of such classes (e.g : app sending huge amounts of compressed data in my case), this can result in this being unsustainable in term of resulting GC load.

Describe the solution you'd like

I would like to suggest some alternatives :

Describe alternatives you've considered

Due to current design of most classes there is sadly no alternative as there is no control over the buffers allocations in constructors.

Tags

Performance