-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large request cause OutOfMemoryException #331
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In our project VaultSharp consistently causes an OutOfMemoryException when doing a batch encryption. It's probably caused by our large request sizes.
We're using 1.13.1
So I think the reason for this is fairly straightforward, and I think has a simple fix. In Polymath.cs on line 203 it uses
StringContent
. Switching this withJsonContent
(which requires System.Net.Http.Json in Framework and .net standard) should enable streaming the object graph rather than duplicating the JSON content twice in memory (one for the immediate UTF-16 version, and then once more for the actual UTF-8 JSON)This should likely improve performance, and reduce memory usage.
The text was updated successfully, but these errors were encountered: