Special Edition Using Visual Basic.NET

function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); } function Print() { window.focus(); if(window.print) { window.print(); window.setTimeout('window.close();',5000); } }
Team-Fly    

Special Edition Using Microsoft® Visual Basic® .NET

By Brian Siler, Jeff Spotts

Table of Contents
Chapter 26.  Debugging and Performance Tuning

Even if a program runs correctly, speed may be a factor in its success. Users do not like to wait on computers any longer than necessary. The process of performance tuning is modifying your program to make it faster. Some examples of performance tuning are changing database queries so they execute faster, eliminating unnecessary procedure calls, or caching data. Performance tuning can be especially important in a multi-tier Internet application, because each Web page request may create a Visual Basic object, which in turn can create other objects or update a database. In a complex architecture such as this one, there are several components to each user request (network data transfer, Visual Basic code execution, database stored procedures) that could potentially cause a performance bottleneck. How do you know which part of your application to attempt to optimize? In the remainder of this chapter, we'll show you a simple way to add a time log that will identify the average speed of your procedure calls. We'll also introduce performance counters, which can be used to determine which parts of your application undergo the heaviest use. As a programmer, having some basic tools to monitor performance will help you determine which areas to focus your performance optimization efforts.


    Team-Fly    
    Top
     

    Категории