Slow Performance on myTable.Rows.Add(newRow)

  • Thread starter Thread starter jdipalmajr
  • Start date Start date
J

jdipalmajr

I am using a strongly typed dataset with a design time schema. I load
data into the dataset tables from xml. The problem I am having is
after the XML load. The first time I Add a row to a table I get very
slow performance (20-30 second delay). The add to table works but I
get slow performance. Any record adds or deletes after this first add
are fast. It does not seem to matter which table the record add
occurs. I get slow performance on the first add. I have no idea what
is causing this slow performance. In debugging, the time is spent on
the myTable.Rows.Add(newRow) line but I cannot figure out what is
delaying the add. Any thoughts on where I might be going wrong?


Any guidance would be welcomed!


Jerry
 
I did some more playing around and noticed that in my code I accidently
switched from strong typed dataset references to untyped references.
When I changed the code to use only strongly typed references the
performance is no longer slow. Any thoughts on why this might be the
case?
 
Back
Top