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

Optimize IStringSerializer.SerializeToString for less GC pressure #702

Open
ssratkevich opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@ssratkevich
Copy link
Contributor

Exploring current implementation of ёComponentSerializer.SerializeToStringё and it's siblings in other serialization classes I noticed, that instead of drilling down to callers StringBuilder children always create their owns.
I suggest to have some way to use common (single) StringBuilder all way down in the serialization.
This can reduce memory pressure and allocation of objects that are essentially unnecessary.

It also opens a way to customization of calendar objects and their serialization for granular calendar building that could pay attention to some external caching strategy of, say, events and others.

@axunonb axunonb changed the title Enhancement: IStringSerializer.SerializeToString Optimize IStringSerializer.SerializeToString for less GC pressure Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants