After a recent Windows 10 update (Fall Up Developer's Update), the performance of our .NET C # 4.0 application dropped significantly. I think there are various problems, and one of them is log4net (or IO drive).
Our application is very complex (various WCF applications and ASPNET MVC 3.0 application), and there are many traces of log4net in development. Loading the first page at startup lasts 4 or 5 minutes, and before the update lasts a minute, if I deactivate the performance of log4net.
I ran a test with two cloned virtual machines, performing registration after the regular expression operation, and the distinguishing features are significant.
Code:
static void Main(string[] args) { Log.Info("Log4net1"); DateTime start = DateTime.Now; for (int i = 0; i < 50; i++) { DoTheThing(); } TimeSpan elapsedTime = DateTime.Now - start; Log.DebugFormat("TOTAL Elapsed time: {0}", elapsedTime.TotalMilliseconds); Console.ReadKey(); } private static void DoTheThing() { DateTime start = DateTime.Now; Regex.Replace(TEXT, " nec ", m => { return " (word nec) "; }); TimeSpan elapsedTime = DateTime.Now - start; Log.DebugFormat("Elapsed time: {0}", elapsedTime.TotalMilliseconds); }
I conducted tests with log4net 1.2.1 and 2.0.8:
average beforeUpdate โ TOTAL Elapsed time: 600 ms
average after Update โ TOTAL Elapsed time: 1000 ms
This is a very important issue for us, and I did not find any information on the network.
- UPDATE -
I found another (unanswered) stream in stackoverflow: log4net became very slow with subscriber location information after updating Windows Autodesk Fallup (1709)
I did a disk test on both environments, and there are no significant differences in read / write speeds. I tested an application that completely disabled log4net (log4net threshold = "OFF"), and now the timings are very similar, so, like @DalmTo's comments, there are many possibilities that will be associated with log4net, I will try there the problem there, although there is already a related one problem with Microsoft: https://connect.microsoft.com/VisualStudio/feedback/details/3143189/after-installing-windows-10-1709-update-creating-a-stacktrace-class-has-become-a-magnitude- slower