[ 
https://issues.apache.org/jira/browse/LOG4NET-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681679#action_12681679
 ] 

Ashish Khandelwal commented on LOG4NET-195:
-------------------------------------------

Good point you raise Eric.

To answer your questions:

 Above code is just an example and saying about the design. It is not full 
code. For example: code is missing to put this thread on Sleep for some time if 
no message in arraylist. It was my assumption that before somebody uses above 
code/design he/she will correct the code and make the changes to meet the 
requirement. 

I am sure that application will not be hanged/busy. I have already implemented 
same design in my multithreaded and single threaded applications, and these 
applications log millions of messages daily. We found that performance have 
improved at great level with this design. (Without this design it was talking 
400 milliseconds for 10000 messages and with this design it start taking only 
50 milliseconds)

About losing some of the message when application crash, developer should use 
"AppDomain.CurrentDomain.ProcessExit" and 
"AppDomain.CurrentDomain.DomainUnload" events. When this event executes make 
sure that all messages are logged into the log file and then only return from 
this event. Remember, log4net also uses these events to remove/close all 
loggers, so you need to deregister these events from Log4Net.

Again, I am just giving a concept, it is people responsibility to understand 
the concept and do not just COPY and PASTE this.


> Log4Net Performance comparison with other logging utility
> ---------------------------------------------------------
>
>                 Key: LOG4NET-195
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-195
>             Project: Log4net
>          Issue Type: Test
>    Affects Versions: 1.2.10
>         Environment: .Net Framework 2.0, VS 2005, Windows XP
>            Reporter: Ashish Khandelwal
>            Priority: Critical
>         Attachments: Log4Net_Vs_nSpring.zip
>
>
> I developed one utility to compare the performance between Log4Net and 
> nSpring(another logging utility). The result I saw is surprise to me - 
> Log4Net took more time than nSpring. It is surprise because "Log4net claims 
> to be fast and flexible: speed first, flexibility second."
> Log4Net says: 
> (http://logging.apache.org/log4net/release/manual/internals.html)
> One of the often-cited arguments against logging is its computational cost. 
> This is a legitimate concern as even moderately sized applications can 
> generate thousands of log requests. Much effort was spent measuring and 
> tweaking logging performance. Log4net claims to be fast and flexible: speed 
> first, flexibility second.
> Although test is saying Log4Net takes more time, I am still not convinced 
> with the result achieved, considering the fact; Log4Net is widely accepted by 
> the industry and known for its speed, reliability and flexibility.
> I would like to know why Log4Net is taking more time, we might be missing any 
> setting or other which can boost the performance. Can you please help to know 
> the reason?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to