Use Memory Stream for Serialization #2886
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why make this change?
We have recently seen an out of memory error coming from the line of code that serializes the column data.
What is this change?
Here, we are using a memory stream in the serialization process to avoid any out of memory errors.
There is a small performance overhead in using a memory stream - and I would like your opinion on whether that could be significant or not. The overhead could be negligible compared to allocating a large string, however, if you think performance would be an issue, we could change the code to only use the memory stream if the data is larger than a threshold
How was this tested?
Sample Request(s)