Solved

Showing the performance of VB.NET within Visual Studio 2010

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

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…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

615 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