[Mono-bugs] [Bug 77317][Nor] New - DbDataAdapter:FillTable grossly
inefficient
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Jan 20 12:47:38 EST 2006
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 prensing at cimetrics.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77317
--- shadow/77317 2006-01-20 12:47:38.000000000 -0500
+++ shadow/77317.tmp.14522 2006-01-20 12:47:38.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 77317
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details: Fedora Core 4
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com
+ReportedBy: prensing at cimetrics.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DbDataAdapter:FillTable grossly inefficient
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I went to load a relative small data set from a DB and found it was too
+slow. I tracked the problem to the fact that it is trying to enforce the
+data set constraints after loading every single row, instead of after
+loading each table.
+
+The problem is in System.Data.Common/DBDataAdapter:FillTable(). It is
+calling dataTable.BeginLoadData() and dataTable.EndLoadData() before/after
+each row, that is, *inside* the inner loop. I believe these calls should be
+put outside the loop.
+
+Also, from looking at the code, it looks like certain error conditions
+would mean that "EndLoadData()" would not get called. I don't know if this
+is correct.
+
+Steps to reproduce the problem:
+1. Create dataset with a few tables and ~100 rows in certain tables
+2. Load from DB
+3. Watch CPU usage.
+
+Actual Results:
+Execution time is significant.
+
+Expected Results:
+
+
+How often does this happen?
+Always.
+
+Additional Information:
+One work around is to set DataSet.EnforceConstraints = false before doing
+the load and then return it to true after. However, this is not needed
+under MS .NET.
More information about the mono-bugs
mailing list