Skip to content

Synchronize block cause performance drop #3016

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

Open
e5l opened this issue Jun 5, 2025 · 0 comments
Open

Synchronize block cause performance drop #3016

e5l opened this issue Jun 5, 2025 · 0 comments

Comments

@e5l
Copy link
Member

e5l commented Jun 5, 2025

Describe the bug
The synchronized block in the char array pool appears to be a bottleneck on the concurrent serialization of many small objects to json:

https://github.com/Kotlin/kotlinx.serialization/blob/4667a1891a925dc9e3e10490c274a[…]n/jvmMain/src/kotlinx/serialization/json/internal/ArrayPools.kt

We observe this in the https://github.com/TechEmpower/FrameworkBenchmarks for Ktor using kotlinx.serialization

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