DEV411 ASP.NET: Best Practices For Performance Stephen Walther www.SuperexpertTraining.com.

Slides:



Advertisements
Similar presentations
Introduction to SharePoint for .NET Developer
Advertisements

Introduction to.Net By Sam Nasr May 5,
Malek Kemmou Technology Architect, Application Platform Microsoft Middle East and Africa Overview of ASP.NET 2.0.
Getting Started with Oracle and .NET
Sofia, Bulgaria | 9-10 October Developing An Advanced ASP.NET Server Control With Rich Design-Time Goksin Bakir Yage Ltd Microsoft Regional Director, MEA.
17. Data Access ADO.Net Architecture New Features of ADO.NET
Module 1: Creating Responsive Pages with Ajax Creating Partial-Page Updates by Using AJAX Scripting Actions on the Web Client.
ASP.NET Ajax Supplementary Tutorial. Why Use ASP.NET AJAX? - I ASP.NET AJAX enables you to build rich Web applications that have many advantages over.
Simplified Management using the Enterprise Policy Management Framework
Win385 Advanced Desktop Testing Scenarios With Virtual PC 2004 Robert Larson Subject Area Manager Microsoft Corporation.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Mobile Application Development using Microsofts.NET Framework (Masters Seminar) by Ranjith Lingamaneni.
Microsoft Office SharePoint Portal Server 2007 Introduction to InfoPath Forms Services Daryl L. Rudolph.
Designing InfoPath Forms: The Dos and Donts Deploying InfoPath Forms: Making the right choice Adding custom business logicin case the built-in stuff isnt.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 23 – ASP.NET Outline 23.1 Introduction 23.2.NET Overview NET Framework ASP (Active.
ASP.NET Page Life Cycle Dev Basics Series Jay Harris.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Accelerating Development with ECO Tim Jarvis
Advanced Performance Techniques in ASP.NET 2.0 William Zhang, Ph.D. Senior Consultant Microsoft Consulting Services.
MSDN Connection Get personalised information on the topics and technologies you want Profile yourself today and get updates via RSS Get personalised information.
More Secure Online Services Powered by the Microsoft SDL Bryan Sullivan Security Program Manager, SDL Microsoft.
WS-SecureConversation Xiuduan Fang. 2 Agenda Introduction Security Context Token Establishing Security Context Deriving Keys SecureCoversation in Action.
Performance Tuning for Informer PRESENTER: Jason Vorenkamp| | October 11, 2010.
ORACLE WebDB 2.2 Montse Collados Polidura SL/CO - April 2000.
Presentation 10 SOAP on the Microsoft Platform (.NET)
SSRS 2008 Architecture Improvements Scale-out SSRS 2008 Report Engine Scalability Improvements.
Small Business Server and Windows SharePoint Services David Overton
Technical Offerings Training, education and opportunities for personal advancement Christopher Kusek - Peters & Associates.
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
Introduction to Dashboards in CRM 4.0 Robert Peledie CRM Consultant Chorus IT.
Intro to SharePoint 2013 Architecture Liam Cleary.
ManageEngine TM Applications Manager 8 Monitoring Custom Applications.
1 Classic ASP vs. ASP.NET Technical Information and Market Adoption Lance Welker University of San Diego Dr. Rebman MSIT 526 December 20, 2005.
DEV450 Visual Studio: Best Practices For Debugging Managed Applications Habib Heydarian Scott Nonnenberg Program Managers Microsoft Corporation.
 Mark Friedman Architect Developer Division Microsoft Corporation.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
ASP.NET 4.0 Web Developers User Group Israel June 2009.
WEB329 ASP.NET: A Lap Around the New Enhancements for Web Developers in Microsoft Visual Studio 2005 Omar Khan Lead Program Manager Web Platform and Tools.
Chapter 9 Using the SqlDataSource Control. References aspx.
An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7.
February 16, Aaron Cuffman Andy Nagle Adam Schultz Web Site.
ASP.Net Web Applications. Characteristics of a typical data driven web application Web Server HTML Graphics Active-X Java Applets HTTP Request ADO / JDBC.
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
DAT305 Boost Your Data-Driven Application Development Using SQL Server Centric.NET Code Generator Pascal Belaud Microsoft France.
Universiti Utara Malaysia Chapter 3 Introduction to ASP.NET 3.5.
AUTOMATION OF WEB-FORM CREATION - KINNERA ANGADI – MS FINAL DEFENSE GUIDANCE BY – DR. DANIEL ANDRESEN.
CIS 451: ASP.NET Concepts Dr. Ralph D. Westfall January, 2009.
Boost data-driven application development using SQL Server Centric.NET Code Generator David Rodriguez SQL Server Technology Specialist Microsoft Corporation.
ASP.NET OPTIMIZATION. Why Optimize? $$$ Whether you build applications for customers or not, enhanced applications save money.
DEV 301 Visual Studio Team System Tom Arnold Program Manager Microsoft Corporation “Enabling Better Software through Better Testing”
Chandrika Shankarnarayan Senior Program Manager Microsoft Corporation SESSION CODE: ASI301.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
DEV414 Black-belt ASP.NET Tips And Tricks For Your ASP.NET Applications Rob Howard Program Manager Web Platform and Tools Team.
DAT 378 SQL Server 2000 Bringing The Best of Reporting Services and Analysis Services Together Sean Boon Program Manager, BI Systems
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
Making Your List and Checking It Twice
Introduction to unit and integration testing with tSQLt
Introduction to ASP.NET 2.0
Haritha Dasari Josue Balandrano Coronel -
11/12/2018 6:58 PM © 2004 Microsoft Corporation. All rights reserved.
Web Development Using ASP .NET
Introduction to NetDB2 IST210.
Intro to Workflow Services and Windows Server AppFabric
Visual Studio 2005 Tools For Office: Creating A Multi-tier Application
Introduction to ASP.NET Parts 1 & 2
Presentation transcript:

DEV411 ASP.NET: Best Practices For Performance Stephen Walther

Purpose of Talk What is the fastest method of displaying a set of database records in an ASP.NET Page?

Testing Tools Trace Tools Profiler Tools Load Tools

Trace Tools ASP.NET Page or Application Tracing Display trace information on page System.Diagnostics Tracing Write trace information to custom listener

Trace Tools

Profiler Tools CLR Profiler Free Profiler from Microsoft ANTS Profiler Available at SQL Profiler Included with Microsoft SQL Server

ANTS Profiler

Load Tools Application Center Test Included with Visual Studio.NET Enterprise Web Application Stress Tool (WAST) Free download from Microsoft site ANTS Load Available at Includes calculated Frustration Coefficient

Test Setup Application Center Test (ACT).NET Framework 1.1 SQL Server 2000 Windows Server 2003 (Standard)

Performance Statistics Requests Per Second (RPS) Time To Last Byte (TTLB) Page Execution Time

Timer Module The Timer Module records the time interval between PreRequestHandlerExecute Event PostRequestHandlerExecute Event

Timer Module PostRequestEventHandlerExecute EndRequest Load Init Unload TimerModule.cs PreRequestEventHandlerExecute BeginRequest Application Events Page Events

Clock Resolution QueryPerformanceCounter is accurate to 1/ of a second or about a millionth of a second

The Test Request page 1050 times Discard first 50 requests Log time of each request Average results

Database Setup Four Database Tables Products10 – 10 Rows Products50 – 50 Rows Products100 – 100 Rows Products500 – 500 Rows

Whats Faster? DataReaderDataSet DisplayDataReader.aspx DisplayDataSet.aspx

DataReader

DataSet

DataReader Versus DataSet

DataReader Versus DataSet Final Results On average, a DataReader is 16% faster than DataSet

3rd Option – ArrayList Using an ArrayList instead of a DataReader results in similar performance with the advantages of a static representation of data DisplayArrayList.aspx

ArrayList

Whats Faster? SqlDataReaderOleDbDataReader

OleDbDataReader

OleDbDataReader Final Results On average, a SqlDataReader is 115% faster than an OleDbDataReader

Whats Faster? Inline SQL Stored Procedure

Whats Faster? DataReader Column Reference By Name: Response.Write(dr[ProductName]); By Ordinal: Response.Write(dr[0]); By GetString(): Response.Write(dr.GetString(0));

Column Reference

Column Reference Final Results On average, ordinal reference is 11% faster than by name

Whats Faster? Proper Case dr[ProductName] Improper Case dr[PRODUCTNAME]

Proper Case

Proper Case Final Results Using proper column case is 1% faster than improper column case

Whats Faster? Inline ASP.NET Controls

DataGrid

DataGrid Final Results Inline script is 233% faster than a DataGrid

Whats Faster? DataGrid with ViewState Disabled DataGrid with ViewState Enabled

ViewState

ViewState Final Results DataGrid with ViewState disabled is 66% faster than DataGrid with ViewState enabled

Whats Faster? AutoGenerateColumns Template Columns

Template Columns Final Results A DataGrid without templates is 39% faster than a DataGrid with templates

Whats Faster? How to improve template performance? DataBinder.Eval Explicit Cast ItemDataBound void ItemDataBound(Object s, DataGridItemEventArgs e) DisplayItemDataBound.aspx

Template Performance

Template Performance Final Results Explicit cast is 11% faster than using a databinding expression

Creating A Custom Control Would a custom DataGrid (with severely reduced functionality) be faster than the standard DataGrid? FastGrid.cs

Custom Control

Custom Control Final Results FastGrid is 37% faster than a standard DataGrid

Whats Faster? DataGrid with no caching DataGrid with data caching DataGrid with output caching

Data Caching

Data Cache Final Results Using the data cache is 637% faster than a standard DataGrid

Output Cache

Output Cache Final Results Using the output cache is infinitely faster than using a standard DataGrid

Conclusions A DataReader is faster than a DataSet An inline DataReader is faster than a DataGrid You pay a high price for ViewState AutoGenerateColumns is faster than template columns Caching is always a good idea!

Performance Resources Microsoft Sites Performancehttp://msdn.microsoft.com/netframework/using/understanding/perf/default.aspxBooks Improving.NET Application Performance and Scalability Web Application Stress Tool CLR Profiler beebdda&displaylang=en ANTS Profiler and ANTS Load

Q1:Overall satisfaction with the session Q2:Usefulness of the information Q3:Presenters knowledge of the subject Q4:Presenters presentation skills Q5:Effectiveness of the presentation Please fill out a session evaluation on CommNet