Solved

Showing the performance of VB.NET within Visual Studio 2010

Posted on 2010-08-20
4
379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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