You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by gsydler <gs...@gmail.com> on 2009/09/09 15:47:57 UTC

Log4j Performance with Netbeans Platform

Hi,

I've recently created a new Netbeans Platform application with a simple 
module and a library wrapper (log4j).

The module executes this code :

RequestProcessor.getDefault().post(new Runnable() {
        public void run() {
            long time = System.currentTimeMillis();
            for (int i = 0; i < 200; i++) {
                LOGGER.debug("i = " + i);
            }
            LOGGER.debug("time to display 200 logs : " + 
(System.currentTimeMillis() - time));
        }
    });


If I execute the programme on Netbeans Platform 6.1, my code displays the
200 logs in 1-5ms.

If I execute the same programme on Netbeans Platform 6.7, it takes a
whopping 35647ms!

Any ideas what's wrong?

Attached files :
- thread dump
- the Netbeans application
- the log4j properties file

Thanks in advance.

Greg

Re: Log4j Performance with Netbeans Platform

Posted by Gregory Sydler <gs...@gmail.com>.
Ok thanks,

I posted on the NetBeans mailing list and bugtrack.

dev@openide.netbeans.org mailing list:
http://openide.netbeans.org/servlets/BrowseList?list=dev&by=thread&from=1021855
http://openide.netbeans.org/servlets/BrowseList?list=dev&by=thread&from=1025671

NetBeans bugtrack:
http://www.netbeans.org/issues/show_bug.cgi?id=171932

Greg

Douglas E Wegscheid wrote:
> a reasonable guess is that console i/o on Netbeans 6.7 is slow. if thei is 
> a problem in log4j, it would appear to be in the consoleappender, 
> fileappender seems to be ok.
>
> perhaps querying someone that knows lot's about Netbeans would be a good 
> idea?
>
> Douglas E Wegscheid
> Lead Technical Analyst, Whirlpool Corporation
> (269)-923-5278
>
> "A wrong note played hesitatingly is a wrong note. A wrong note played 
> with conviction is interpretation."
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log4j Performance with Netbeans Platform

Posted by Douglas E Wegscheid <Do...@whirlpool.com>.
a reasonable guess is that console i/o on Netbeans 6.7 is slow. if thei is 
a problem in log4j, it would appear to be in the consoleappender, 
fileappender seems to be ok.

perhaps querying someone that knows lot's about Netbeans would be a good 
idea?

Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278

"A wrong note played hesitatingly is a wrong note. A wrong note played 
with conviction is interpretation."

Re: Log4j Performance with Netbeans Platform

Posted by gsydler <gs...@gmail.com>.
Thanks for your reply,

On Netbeans Platform 6.1 :
With the same code and System.out.println : 2-3ms
With FileAppender : 2-5ms

On Netbeans Platform 6.7 :
With the same code and System.out.println : 19-30ms
With FileAppender : 2-5ms

Greg

Douglas E Wegscheid wrote:
> what is the relative performance of System.out.println on the two 
> platforms?
>
> what is the relative performance of log4j when using a FileAppender?
>
> Douglas E Wegscheid
> Lead Technical Analyst, Whirlpool Corporation
> (269)-923-5278
>
> "A wrong note played hesitatingly is a wrong note. A wrong note played 
> with conviction is interpretation."
>
>
>
> gsydler <gs...@gmail.com> wrote on 09/09/2009 09:47:57 AM:
>
>   
>> Hi,
>>
>> I've recently created a new Netbeans Platform application with a simple 
>> module and a library wrapper (log4j).
>>
>> The module executes this code :
>>
>> RequestProcessor.getDefault().post(new Runnable() {
>>         public void run() {
>>             long time = System.currentTimeMillis();
>>             for (int i = 0; i < 200; i++) {
>>                 LOGGER.debug("i = " + i);
>>             }
>>             LOGGER.debug("time to display 200 logs : " + 
>> (System.currentTimeMillis() - time));
>>         }
>>     });
>>
>>
>> If I execute the programme on Netbeans Platform 6.1, my code displays 
>>     
> the
>   
>> 200 logs in 1-5ms.
>>
>> If I execute the same programme on Netbeans Platform 6.7, it takes a
>> whopping 35647ms!
>>
>> Any ideas what's wrong?
>>     
>
>   

-- 
Le génie logiciel est un art, il est difficile de le maitriser mais d'autant plus de le comprendre.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log4j Performance with Netbeans Platform

Posted by Douglas E Wegscheid <Do...@whirlpool.com>.
what is the relative performance of System.out.println on the two 
platforms?

what is the relative performance of log4j when using a FileAppender?

Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278

"A wrong note played hesitatingly is a wrong note. A wrong note played 
with conviction is interpretation."



gsydler <gs...@gmail.com> wrote on 09/09/2009 09:47:57 AM:

> Hi,
> 
> I've recently created a new Netbeans Platform application with a simple 
> module and a library wrapper (log4j).
> 
> The module executes this code :
> 
> RequestProcessor.getDefault().post(new Runnable() {
>         public void run() {
>             long time = System.currentTimeMillis();
>             for (int i = 0; i < 200; i++) {
>                 LOGGER.debug("i = " + i);
>             }
>             LOGGER.debug("time to display 200 logs : " + 
> (System.currentTimeMillis() - time));
>         }
>     });
> 
> 
> If I execute the programme on Netbeans Platform 6.1, my code displays 
the
> 200 logs in 1-5ms.
> 
> If I execute the same programme on Netbeans Platform 6.7, it takes a
> whopping 35647ms!
> 
> Any ideas what's wrong?