Optimising app

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

We have an access application running over a win2k network. I have now
rewritten the ap in vb.net and the problem is that the vb.net app runs
generally slower(!) then than the access app.

I am using a typical dataset/dataadapter scenario and doing most of the
things in code including the data access layer and individual field binding.
I am reading one master record at a time so this should not be too slow(?).
The detail records appear in grids but these are indexed retrieval.

How can I optimise the application? What areas can I look into and what
techniques can I use to pinpoint the bottlenecks?

Thanks

Regards
 
John:

Are you hitting the same access database?
Is it slower under load or just with a single user?

If the app is slow even in a single user scenario, you could try to
enable tracing for the page and take a look at the timing information
ASP.NET gives you. Add your own Trace.Write calls to time specific
areas of code. Perhaps this might help you find a poorly performing
area.

INFO: New Tracing Feature in ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q306731

HTH,
 
Here is one paragaraph from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dotnetperftips.asp.

Avoid Auto-Generated Commands
When using a data adapter, avoid auto-generated commands. These require
additional trips to the server to retrieve meta data, and give you a lower
level of interaction control. While using auto-generated commands is
convenient, it's worth the effort to do it yourself in performance-critical
applications.

What exactly is wrong with the auto-generated statements and what changes do
I need to make?

Thanks

Regards
 
William Vaughn has a good article on the drawbacks of using the
auto-generated commands:

Weaning Developers from the CommandBuilder
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/commandbuilder.asp

Here is another article benchmarking various data access techniques to
show the impact of using auth generated commands. You might find this
an interesting read also.

Performance Comparison: Data Access Techniques
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bdadotnetarch031.asp
 
John,
In addition to the other comments:
What exactly is wrong with the auto-generated statements and what changes do
I need to make?
As the paragraph states, they require additional trips to the Database
server. Each trip to the database server takes time, the more trips the more
time. Note the Auto-Generated in that statement is auto-generated at run
time, not generated at design time.

In addition to Vaughn's article, You may want to get David Sceppa's book
"Microsoft ADO.NET - Core Reference" from MS Press. It is a good tutorial on
ADO.NET, plus a good desk reference for once you know ADO.NET.

Hope this helps
Jay
 
Back
Top