How to tweak DataSet performance?

  • Thread starter Thread starter psuedonym
  • Start date Start date
P

psuedonym

Hi all,

My program keeps track of my work out routines:

I've got a DataSet that consists of three Tables.
dates : id, stamp
lifts: id, lift, note
sets: did, lid, wt, r1, r2, r3, note

There are two Relations:
dates-sets: dates:id to sets:did
lifts-sets: lifts:id to sets:lid

During testing, and when I first started using the program it was pretty
responsive. Now, with 204 total records (25 dates, 17, lifts, the rest are
sets) the load time has increased from about 3 seconds to about 35 seconds.

Can anyone offer any suggestions to decrease my load time?


Thanks,


Nick
 
Hi,

Maybe databinding the datagrid with dataset is the cause of this decrease
in performance. Try to load data to datagrid manually instead of
databinding.

Girish
 
Who said anything about a data grid ?? ;-)

I'm binding two combo boxes, one to the dates, one to the lifts.

I moved my call to ds.ReadXml() to occur before the binding. I may have
shaved off a second or two, but otherwise there's not much difference.
 
Using XML is fast and standar for a few data.
Using XML with thousands of records is very slow, almost saving the XML.

If you spect to increse your record number, I would suggest you to change
the data storage.
 
Ibai.

Right now I'm talking about 204 rows. not thousands. 35 seconds load time
seems to be too much for so little data.

Even if we assume I'll be keeping a whole year's worth of work-outs on my
V37...Say 24 exercies. working out 3 times per week, with average of 8 lifts
per work-out... we're only talking about 24 + (52 * 3) + (52 * 3 * 8) =
1428 rows MAX.

Again, it seems to me this is exactly the sort of thing the data set was
designed to handle...

So far I've managed to shave off about 5 seconds with Girish's suggestion,
and streamlining my data set creation:

c = new Column(name,type,expr,mapping)
c.ReadOnly =
etc.etc.
t.Columns.Add(c)

instead of

c = t.Columns.Add(name)
c.DataType =
c.ColumnMapping =
c.ReadOnly =
etc.etc.


I also tried loading the data before I setup the relations.. (scary thought)
but this seemed to make things worse.


Any other ideas?
 
Are you doing something on SelectedIndexChanged or something else? There
is something with the events. Using DataSource sends the message several
times. Search in the group for more information.

Christoph
 
Well, I've not had alot of luck speeding up the DataSet load ... a few
seconds here and there, so I'm looking at other options.

Knowing *my* ppc is set for CPU speed = Auto is there a way available to me
through the framework that would let me
request full speed from point A to point?
 
Back
Top