-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Close the Jackson Generator to save buffer leaks #3310
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
Conversation
|
IDK @martin-g if the failure is related to this change |
|
Hi @jbonofre it's Franz (I was working Artemis years ago) sorry for the naked ping but this one is causing some performance degradation to our Quarkus and Apicurio users, can you take a look? 🙏 |
|
@MichalFoksa there is anything I can do to help here, or anything I am missing? 🙏 |
|
Just for reference, this change is saving to allocate a fresh new 4K sized char[] buffer each time, see https://github.com/FasterXML/jackson-core/blob/bef7d7a199a99f881732758199d8e6d0349bdb28/src/main/java/com/fasterxml/jackson/core/util/BufferRecycler.java#L96 |
|
@franz1981 However, I think closing JsonGenerator could also be useful in:
|
|
do you know @MichalFoksa who I can ping for this? |
|
… On Wed, 26 Feb 2025 at 15:53, Francesco Nigro ***@***.***> wrote:
do you know @MichalFoksa <https://github.com/MichalFoksa> who I can ping
for this?
as said, this is a severe performance issue which can be fixed with a
one-liner...
—
Reply to this email directly, view it on GitHub
<#3310 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNGENUKBIQ3DF5DM36P7D32RXIQBAVCNFSM6AAAAABW5NQIZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBVGMYDINZQG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: franz1981]*franz1981* left a comment (apache/avro#3310)
<#3310 (comment)>
do you know @MichalFoksa <https://github.com/MichalFoksa> who I can ping
for this?
as said, this is a severe performance issue which can be fixed with a
one-liner...
—
Reply to this email directly, view it on GitHub
<#3310 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNGENUKBIQ3DF5DM36P7D32RXIQBAVCNFSM6AAAAABW5NQIZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBVGMYDINZQG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
This is great @franz1981 thanks for making this change! And thanks @MichalFoksa for pinging me 🙌 |
|
Thanks both folks and let me know if you need the follow up others suggested by @MichalFoksa |
Since FasterXML/jackson-core#919 jackson now requires to close its
JsonGeneratorto save buffer leaks - and eventually cause further big allocations due to not be able to reuse the existing one.This can be saved by correctly closing the used
JsonGenerator.