yf0994 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Eventbus using JUL (java.util.logging) performance problems with SLF4J #1132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the eventbus uses java.util.logging for recording event failure.

The problem is if I enable JUL over SLF4J I will get serious performance 
problems with other libraries that use JUL see: 

http://www.slf4j.org/legacy.html quoted below ==>

"""
Please note this traslation process incurs the cost of constructing a LogRecord 
instance regardless of whether the SLF4J logger is disabled for the given level 
or nor. Consequently, j.u.l. to SLF4J translation can seriously increase the 
cost of disabled logging statements (60 fold or 6000%) and measurably impact 
the performance of enabled log statements (20% overall increase). As of 
logback-version 0.9.25, it is possible to completely eliminate the 60 fold 
translation overhead for disabled log statements with the help of 
LevelChangePropagator.
"""

I know there are lots of talks of subclassing event(bus/handler) but I figured 
another use case might give you some ideas.

Original issue reported on code.google.com by adam.g...@evocatus.com on 1 Sep 2012 at 3:33

GoogleCodeExporter commented 9 years ago
I forgot to put this in the EventBus package for issues.

Original comment by adam.g...@evocatus.com on 2 Sep 2012 at 1:56

GoogleCodeExporter commented 9 years ago
I'm merging this into the more general issue of customizing exception handling.

Original comment by wasserman.louis on 5 Sep 2012 at 2:08

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08