Solved

Showing the performance of VB.NET within Visual Studio 2010

Posted on 2010-08-20
4
376 Views
Last Modified: 2013-11-27
Hi all

I have a small VB.NET application that connects to a SQL database, runs some queries and emails the results.
There are quite a few areas in the code that I know can be streamlined to make the app run faster, however, I'd like to be able to see just how much of an improvement the changes to the code will make.

Can anyone advise how to view the impact on system resources that an application uses when it runs, so that I might see the difference when I change the code?  Also are there any other items that I should be watching for?

I'm using Visual Studio 2010 Professional.
0
Comment
Question by:Rouchie
4 Comments
 
LVL 18

Accepted Solution

by:
Dennis Aries earned 125 total points
ID: 33483061
Check out the following articles
http://msdn.microsoft.com/en-us/library/ms998579.aspx - Measuring performance
http://msdn.microsoft.com/en-us/library/ms998581.aspx - Testing performance
http://msdn.microsoft.com/en-us/library/ms998583.aspx - Tuning performance

All part of the Improving .NET Application performance and Scalability (http://msdn.microsoft.com/en-us/library/ff649152.aspx)
0
 
LVL 4

Assisted Solution

by:Sarika30
Sarika30 earned 125 total points
ID: 33483062
You can see the CPU usage from the task manager. Under the Processes tab you can see the CPU counter used by the application. You can see the CPU performance under the performance tab.
0
 
LVL 10

Assisted Solution

by:joriszwaenepoel
joriszwaenepoel earned 125 total points
ID: 33483777
Usually I use code like this to test the duration of a block of code:

dim start as datetime = datetime.now
' .... do the work here
dim duration = datetime.now.dubtract(start)
debug.writeline("duration: " & duration.totalmilliseconds & " ms")

If the duration is too short to notice the difference, you could use a loop to execute your code 100  or 1000 times.

However, your performance is influenced by other tasks running on your PC, so if you want accurate results, you probably need to test the duration several times.
0
 
LVL 21

Assisted Solution

by:mastoo
mastoo earned 125 total points
ID: 33485445
The above work, but if you are going to do much of this you might look at something like the red-gate ants profiler.  It quickly shows areas to focus on for performance gains.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now