On Tue, Mar 15, 2016 at 1:56 AM, Mikael Ståldal <[email protected]>
wrote:

> How would you use such a thing?
>

(1) Run my app performance driver, make sure it works.
(2) Set logging to "no-op" for all logging to make it go faster (as Remko
describes in theory)

We implement standard APIs (like JDBC) and we call traceEntry/traceExit on
these standard APIs, some of which are in tight loops: get each column
value for each row of a 50m row table for example.

Calling Logger.isTraceEnabled() is called 50m x # of columns and then some
and shows up as between 2 and 5% in a profiler (I use YourKit for now).

I want to eliminate that in get the raw performance timings as low as
possible. We can also tell customers that once they have everything set up
just so, then can toggle this switch to get a 2-5% improvement (depending
on the job).

Gary


> On Mon, Mar 14, 2016 at 10:00 PM, Gary Gregory <[email protected]>
> wrote:
>
>> I'm seeing mehtods isTraceEnabled() show up in my profiling sessions.
>>
>> I'd like to be able to configure Log4j as totally no-op when for use
>> cases where performance is all that matters.
>>
>> I wonder if we could have a NoOpLogger in core that just stubs out
>> everything, and another ErrorLogger that NoOps everything below ERROR.
>>
>> Thoughts?
>>
>> Gary
>>
>> --
>> E-Mail: [email protected] | [email protected]
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> [email protected]
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to