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

Dominik Psenner edited comment on LOG4NET-500 at 1/4/16 9:12 PM:
-----------------------------------------------------------------

This is probably related to how we fixed LOG4NET-485. Making the roll lock 
configurable would probably improve the performance penalty, but one could 
check if the lock gets acquired more often than necessary.

Is the performance a problem?


was (Author: nachbarslumpi):
This is probably related to how we fixed LOG4NET-485. Making the roll lock 
configurable would probably improve the performance penalty, but one could 
check if the lock gets acquired more often than necessary.

> 1.2.15 RollingFileAppender is 60% slower than 1.2.11
> ----------------------------------------------------
>
>                 Key: LOG4NET-500
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-500
>             Project: Log4net
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 1.2.15
>         Environment: 4.5.2 .NET Framework
>            Reporter: Larry Aucoin
>
> 1.2.15 RollingFileAppender is 60% slower than 1.2.11.  I am using the 
> following code and app.config file to test the 2 versions.  
> APP.CONFIG
> ========================
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
>   <configSections>
>     <section name="log4net" 
> type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
>   </configSections>
>   <log4net>
>     <root>
>       <level value="DEBUG" />
>       <appender-ref ref="RollingFileAppender" />
>     </root>
>     <appender name="RollingFileAppender" 
> type="log4net.Appender.RollingFileAppender, log4net">
>       <file value="C:\TraceLogging\TraceLoggingTeset1.2.15.log" />
>       <appendToFile value="true" />
>       <rollingStyle value="Size" />
>       <maxSizeRollBackups value="10" />
>       <maximumFileSize value="20MB" />
>       <staticLogFileName value="true" />
>       <layout type="log4net.Layout.PatternLayout, log4net">
>         <param name="ConversionPattern" value="%date [%thread] %-5level 
> [%logger].%message%newline" />
>       </layout>
>     </appender>
>   </log4net>
>     <startup> 
>         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
>     </startup>
> </configuration>
> ========================
> CODE:
> ========================
> using System;
> using System.Collections.Generic;
> using System.ComponentModel;
> using System.Data;
> using System.Drawing;
> using System.Linq;
> using System.Text;
> using System.Threading.Tasks;
> using System.Windows.Forms;
> using System.Diagnostics;
> using log4net.Core;
> namespace TraceLoggingTest
> {
>     public partial class Form1 : Form
>     {
>         public log4net.ILog Logger;
>         public Form1()
>         {
>             InitializeComponent();
>             Logger = log4net.LogManager.GetLogger("Form1");
>             log4net.Config.XmlConfigurator.Configure();
>         }
>         private void btnTest_Click(object sender, EventArgs e)
>         {
>             
> Logger.Debug("=====================================================");
>             Stopwatch sw = new Stopwatch();
>             sw.Start();
>             for (int i = 0; i < 5000; i++)
>             {
>                 Logger.Debug("Write item [" + i.ToString() + "]...");
>             }
>             sw.Stop();
>             Logger.Debug("TOTAL TIME [" + sw.ElapsedMilliseconds.ToString() + 
> "]");
>             this.lblTime.Text = sw.ElapsedMilliseconds.ToString() + " ms";
>             
> Logger.Debug("=====================================================");
>         }
>     }
> }
> ========================



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to