Closed jorygeerts closed 6 years ago
@gravis From the looks of it, you seem in charge of this project. Could you take a look at my PR? Thanks! (Sorry to ping you like this, but I have no idea if you're being notified about issues and PRs.)
Thanks for your contribution, and sorry for being late on this. I will review that by the end of the week.
The code in
graylog.Writer.WriteMessage()
constructs a new gzip/zlib writer for every message. This slows down the entire application (over 50% of my application time was spent inruntime.gcDrain()
).By only creating a gzip/zlib writer once, this overhead is removed, speeding everything up.