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 [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=80075

--- shadow/80075        2006-11-28 11:13:58.000000000 -0500
+++ shadow/80075.tmp.13891      2006-11-28 11:13:58.000000000 -0500
@@ -0,0 +1,91 @@
+Bug#: 80075
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: bad performance problem with access of datarow column
+
+Description of Problem:
+When you access a datarow column, if the column name is not exactly (case
+sensitive) the same the performances are very poor.
+
+Steps to reproduce the problem:
+1. Try this test
+
+        public static void Main()
+        {
+        
+       
+               DataTable dt=new DataTable();
+               for (int i=0;i<100;i++)
+               {
+                       dt.Columns.Add("nom_colonne"+i,typeof(string));
+               }
+               for (int j=0;j<100;j++)
+               {
+                       DataRow r=dt.NewRow();
+                       for (int k=0;k<10;k++)
+                       {
+                               r[k]=Guid.NewGuid().ToString();
+                       }
+                       dt.Rows.Add(r);
+               }
+               DateTime debut=DateTime.Now;
+               foreach (DataRow thisDataRow in dt.Rows)
+               {
+                       string s="";
+                       for (int i=0;i<dt.Columns.Count;i++)
+                       {
+                               string index="NOM_COLONNE"+i;
+                               s+=thisDataRow[index].ToString();
+                               
+                       }
+                       
+               }
+               DateTime fin=DateTime.Now;
+               TimeSpan dure=fin-debut;
+               Console.WriteLine("Durée :"+dure);
+               
+               
+        }
+
+
+Actual Results:
+Execution time : 12s
+
+If you replace : 
+string index="NOM_COLONNE"+i;
+by
+string index="nom_colonne"+i;
+
+you get
+:0.166ms
+
+(one hundred times faster!)
+
+
+Expected Results:
+On MS.NET you get :
+
+0.125 (in the worse case) (MS.NET is 100x faster than mono in this case)
+and 
+0.062 (in the best case) (MS.NET is only 2x faster than mono)
+
+
+
+
+How often does this happen? 
+always
+
+Additional Information:
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to