JSON Encoding Performance #83
Closed
pschichtel
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
@osiegmar should I create issues for the two points I had? Would it be useful to get my encoder upstream, e.g. as a separate module? I could rewrite it in Java if there is interest in this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@pschichtel Sorry for replying late. Currently I don't see a need for changing / enhancing this library's code base in order to tune its performance. I'm wondering what exact problems you had that led you to re-implement it? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As part of the performance work I've been doing on the project I work on, I ended up completely rewriting the GelfEncoder to avoid allocations and remove overhead.
https://gist.github.com/pschichtel/cb5556b9d5b681e1e77afabb749186e9
I implemented it using Jackson and Kotlin, since we are using those anyway, so I don't expect any of this to be merged.
This implementation is significantly faster and generates a lot fewer objects then the original one.
However while implementing this I noticed two "issues":
The former could easily be solved by making it a public constant, not so sure about the latter, but it is also not really a problem.
Beta Was this translation helpful? Give feedback.
All reactions