Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BcNuGet] Reduce memory consumption, improve performance, prevent mem…
…ory leaks (#3760) We found that `Compress-Archive` and especially storing the `octet-stream` inside a string instead of using a Stream causes a very high memory consumption and a bad performance. We're invoking the BcNuGet Cmdlets from our own C# API and therefore were able to profile the memory and performance. The behaviour however is similar when invoking the Cmdlets directly (PowerShell Core 7.4.6). **Memory (Note: around 340 MB is the base load our API brings with it)** Before: Memory spikes when uploading big apps, around 1 GB memory consumption from BcNuGet Cmdlets <img width="502" alt="image" src="https://github.com/user-attachments/assets/81d81377-304f-459f-a8b3-dd1fbe187b8c"> After: <img width="497" alt="image" src="https://github.com/user-attachments/assets/6bb2fcd3-0889-4619-b333-341b200050b8"> **Performance** Before: <img width="516" alt="image" src="https://github.com/user-attachments/assets/62747a1e-751a-4b89-bd62-adcd347d31a0"> After: <img width="526" alt="image" src="https://github.com/user-attachments/assets/be427969-c7cc-4bf4-a05d-43894163998b">
- Loading branch information