This seems slow...Why???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I'm just coming up to speed here on .NET and have a C# WinForm App that accesses a database. I've gotta form with the following code in the form_load event

private void DocumentsDetail_Load(object sender, System.EventArgs e

this.dsDocuments1.Clear()
this.daDocuments.Fill(this.dsDocuments1.Documents_Sel)


The DataAdapter is using Stored Procedures and I'm seeing dismal performance on my local development machine. To bring the form up _without_ the above code, it displays in under 1 second. Add the above code and it takes a little over 4 seconds to bring it all up with the data being displayed

This particular stored procedure is simply a 'Select * from Documents'. Table only contains 3 records and should not have more than 150 records, so not worried about the star. Number of columns is around 15 or so

Machine isn't latest and greatest, but certainly not a dog either

Is this a typical response time and so should just get used to this, or more a pilot error? Appreciate any comments on this - this just really seems very slow to me and I'm concerned

Thanks...Bo
 
Hi Bob,

Are you sure that Fill method is slow?
Is your table bound to a control or controls?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Bob McCormick said:
Hi All,

I'm just coming up to speed here on .NET and have a C# WinForm App that
accesses a database. I've gotta form with the following code in the
form_load event:
private void DocumentsDetail_Load(object sender, System.EventArgs e)
{
this.dsDocuments1.Clear();
this.daDocuments.Fill(this.dsDocuments1.Documents_Sel);
}

The DataAdapter is using Stored Procedures and I'm seeing dismal
performance on my local development machine. To bring the form up _without_
the above code, it displays in under 1 second. Add the above code and it
takes a little over 4 seconds to bring it all up with the data being
displayed.
This particular stored procedure is simply a 'Select * from Documents'.
Table only contains 3 records and should not have more than 150 records, so
not worried about the star. Number of columns is around 15 or so.
Machine isn't latest and greatest, but certainly not a dog either.

Is this a typical response time and so should just get used to this, or
more a pilot error? Appreciate any comments on this - this just really
seems very slow to me and I'm concerned.
 
Hi Miha

Initially yes, but I have since cleared all of the data binding properties and it's still slow. But even after doing that, I still see data loading in the form when I rerun. Almost like what I deleted never happened, yet there aren't any databindings viewable in properties, and I've also looked in the generated code too

This is much too strange. Using VS2003, so not sure if I'm completely lost (probably) or something still not right in code.

Regardless, even if I had bound my controls, this seems incredibly slow to me for such a simple form. What would be faster? Doing everything manually and not binding at all? No problem if that's the case, just lost some of the lustre however

I'm terribly confused at this point and certainly couldn't live with this performance. This is worse than Java a couple of revs back

Appreciate any thoughts you'd care to share

Thanks...Bob
 
Hi Bob,

Nah, it should be fast. I guess that you have a problem somewhere.
Try creating a new instance of dataset and pass to Fill method so you'll be
sure that there is no binding involved.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Bob McCormick said:
Hi Miha,

Initially yes, but I have since cleared all of the data binding properties
and it's still slow. But even after doing that, I still see data loading in
the form when I rerun. Almost like what I deleted never happened, yet there
aren't any databindings viewable in properties, and I've also looked in the
generated code too.
This is much too strange. Using VS2003, so not sure if I'm completely lost
(probably) or something still not right in code.
Regardless, even if I had bound my controls, this seems incredibly slow to
me for such a simple form. What would be faster? Doing everything manually
and not binding at all? No problem if that's the case, just lost some of
the lustre however.
I'm terribly confused at this point and certainly couldn't live with this
performance. This is worse than Java a couple of revs back!
 
Back
Top