[Mono-bugs] [Bug 65734][Nor] New - System.Threading.Timer 20x slower than MSFT's
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 11 Sep 2004 00:39:30 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=65734
--- shadow/65734 2004-09-11 00:39:30.000000000 -0400
+++ shadow/65734.tmp.19085 2004-09-11 00:39:30.000000000 -0400
@@ -0,0 +1,37 @@
+Bug#: 65734
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Threading.Timer 20x slower than MSFT's
+
+This test takes 20x longer on Mono than on MSFT's runtime:
+
+using System;
+using System.Threading;
+
+class X {
+ static void Main ()
+ {
+ for (int i = 0; i < 1000; i ++) {
+ Timer t = new Timer (new TimerCallback (Foo), i, 1000, 0);
+ // do stuff
+ t.Dispose ();
+ }
+ }
+ static void Foo (object o) {}
+}
+
+The problem is that we create a thread for each timer, while MSFT appears
+to only create one thread for the lifetime of the program.