[Mono-bugs] [Bug 74635][Wis] New - DrawImage works too slow!
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 16 Apr 2005 10:32:13 -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 vguzev@yandex.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=74635
--- shadow/74635 2005-04-16 10:32:13.000000000 -0400
+++ shadow/74635.tmp.22986 2005-04-16 10:32:13.000000000 -0400
@@ -0,0 +1,91 @@
+Bug#: 74635
+Product: Mono: Class Libraries
+Version: 1.0
+OS: GNU/Linux [Other]
+OS Details: Linux skif 2.4.25 #2 SMP Fri Apr 23 14:03:00 MSD 2004 i686 athlon i386
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vguzev@yandex.ru
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DrawImage works too slow!
+
+Description of Problem:
+DrawImage works 15 times slower in Mono than in MS.Net even if we use
+faster Linux machines...
+
+Steps to reproduce the problem:
+1. mcs /r:System.Drawing test.cs
+--8<-------test.cs-------------------------------
+using System;
+using System.Drawing;
+
+public class TestDrawImageTime {
+ public static void Main( String[] args ) {
+ Bitmap outer_image = new Bitmap ( 19540, 51 );
+ Graphics graphics = Graphics.FromImage( outer_image );
+ for ( int i = 0; i < 3; i++ ) {
+ Bitmap inner_image = new Bitmap( "imagePart" + ( i*17 ) );
+ DateTime dt1 = DateTime.Now;
+ graphics.DrawImage( inner_image, 0, i * 17 );
+ DateTime dt2 = DateTime.Now;
+ Console.WriteLine( "DrawImage elapsed time = " + dt2.Subtract
+(dt1).TotalSeconds );
+ }
+ }
+}
+--8<---------------------------------------------
+
+2. Copy 3 jpeg-images (attached) into the same folder as test.cs
+2. mono test.exe
+
+Actual Results:
+On Windows (MS.Net) I get the following (Athlon 1600+):
+--8<---------------------------------------------
+ DrawImage elapsed time = 0,015625
+ DrawImage elapsed time = 0,015625
+ DrawImage elapsed time = 0,015625
+--8<---------------------------------------------
+
+On Linux (mono) I get the following (Athlon 2000+):
+--8<---------------------------------------------
+ DrawImage elapsed time = 0.01389
+ DrawImage elapsed time = 0.149813
+ DrawImage elapsed time = 0.149884
+--8<---------------------------------------------
+
+As you can see on the second file the time is approximately 15 times
+slower than on the first one...
+
+Expected Results:
+It should take even less time than on MS.Net cause machine under Linux has
+faster processor...
+
+How often does this happen?
+always
+
+Additional Information:
+--8<---------------------------------------------
+$ uname -a
+Linux skif 2.4.25 #2 SMP Fri Apr 23 14:03:00 MSD 2004 i686 athlon i386
+GNU/Linux
+
+$ mono --version
+Mono JIT compiler version 1.1.4, (C) 2002-2005 Novell, Inc and
+Contributors. (Link: www.mono-project.com)www.mono-project.com
+ TLS: __thread
+ GC: Included Boehm (with typed GC)
+ SIGSEGV : normal
+ Globalization: normal
+--8<---------------------------------------------
+
+
+Best regards,
+Vadim B. Guzev
+http://u.pereslavl.ru/~vadim/MCSharp/