-
Notifications
You must be signed in to change notification settings - Fork 74
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
Optimize logging output #27
Comments
I'll soon take a look, I'll try to run a profiler on it and see what can be optimized. It would be super cool to make it do more jobs per second :-) |
I tried to optimize it but couldn't find a single bottleneck. The time is spread across converting the time to a string, appending to the IO, etc. I don't think there's much that can be done. |
Ugh, it's such a huge difference; I'm surprised there's no low-hanging fruit to pick. Thanks for looking at it. |
BTW I tried turning off the GC and it actually made it slower. Maybe heap size can affect performance? Logging appears to generate ~20% of the garbage. |
I noticed that setting the benchmark logger level to WARN, the jobs per sec went from 15k to 36k!
To reproduce:
make bench
.I optimized the Logger::Formatter here to stream to the IO but it didn't appear to make a difference. The logger is used here. Any ideas on how to minimize the log overhead?
The text was updated successfully, but these errors were encountered: