Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

GtkSerializer should use transcoding stream #22598

Closed
Mrnikbobjeff opened this issue May 23, 2024 · 0 comments
Closed

GtkSerializer should use transcoding stream #22598

Mrnikbobjeff opened this issue May 23, 2024 · 0 comments

Comments

@Mrnikbobjeff
Copy link
Contributor

Description

The GtkSerializer does implement transcoding inefficiently. Instead of reading the entire value into memory, one could simply peek the stream for the fast path instead of reading it in one go. Furthermore, instead of materializing the result before calling the deserializer one could use the Encoding.CreateTranscodingStream method to have a stream which automatically encodes the input to UTF8.
Recreation of issue with correct GH account

Public API Changes

None

Intended Use-Case

Allocation reduction

@dotnet dotnet locked and limited conversation to collaborators May 23, 2024
@PureWeen PureWeen converted this issue into discussion #22618 May 23, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant