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

JSON Encoding Performance #89

Closed
osiegmar opened this issue Apr 12, 2023 Discussed in #83 · 1 comment
Closed

JSON Encoding Performance #89

osiegmar opened this issue Apr 12, 2023 Discussed in #83 · 1 comment

Comments

@osiegmar
Copy link
Owner

Discussed in #83

Originally posted by pschichtel June 22, 2022
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":

  1. the gelf version constant is not accessible
  2. the GelfUdpAppender (I assume the same to be the case for the others) expect a subclass of GelfEncoder

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.

@osiegmar
Copy link
Owner Author

osiegmar commented Oct 8, 2023

I made some changes locally but in the end I decided to keep the code as it is (for maintainability reasons).

@osiegmar osiegmar closed this as completed Oct 8, 2023
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