Skip to content
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

Improve handling of the HTTP body #9

Open
william-stacken opened this issue Jul 25, 2021 · 1 comment
Open

Improve handling of the HTTP body #9

william-stacken opened this issue Jul 25, 2021 · 1 comment

Comments

@william-stacken
Copy link
Owner

william-stacken commented Jul 25, 2021

The HTTP body is stored in HttpMessage.cs as a byte array, which is not ideal since it increases memory usage when transfering a lot of data. Maybe this could be solved by optionally setting a filepath or a stream that the body can be read from or written to instead?

This would make it possible to remove the ReadLog method from Logger.cs and replace it with a "WriteLogToStream" method instead, improving memory usage.

@william-stacken
Copy link
Owner Author

Now that there is a LogStream class and the pointless mutex in Logger.cs has been removed, it should be fairly simple to replace ReadLog with GetLogStream. One could then set the body in HttpMessage to this stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant