Solved

Showing the performance of VB.NET within Visual Studio 2010

Posted on 2010-08-20
4
375 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

19 Experts available now in Live!

Get 1:1 Help Now