Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ASP.NET Site Performance Secrets

You're reading from   ASP.NET Site Performance Secrets Simple and proven techniques to quickly speed up your ASP.NET website

Arrow left icon
Product type Paperback
Published in Oct 2010
Publisher Packt
ISBN-13 9781849690683
Length 456 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Mattijs Perdeck Mattijs Perdeck
Author Profile Icon Mattijs Perdeck
Mattijs Perdeck
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

ASP.NET Site Performance Secrets
Credits
About the Author
About the Reviewers
1. Preface
1. High Level Diagnosis FREE CHAPTER 2. Reducing Time to First Byte 3. Memory 4. CPU 5. Caching 6. Thread Usage 7. Reducing Long Wait Times 8. Speeding up Database Access 9. Reducing Time to Last Byte 10. Compression 11. Optimizing Forms 12. Reducing Image Load Times 13. Improving JavaScript Loading 14. Load Testing

Assuring good performance


Before you start diagnosing and fixing performance issues, let's first have a quick look at how this fits in to the overall process of assuring good performance. This process consists of these parts:

  • Continuous monitoring

  • Setting performance goals

  • Iterative improvements

Let's go through each part of the process one-by-one.

Continuous monitoring

The performance of your website is affected by both the things you control, such as code changes, and the things you cannot control such as increases in the number of visitors or server problems. Because of this, it makes sense to monitor the performance of your site continuously. That way, you find out that the site is becoming too slow before your manager does.

At the end of this section, you'll find a list of monitoring services that will keep an eye on your site.

What do you mean by "site is becoming too slow"? Glad you asked.

Setting performance goals

When this books talks about performance, it ultimately talks about page load time that's what your visitors and potential customers experience.

It pays to have a clear understanding of how fast is fast enough. Spending time and effort on making your site faster is time and effort not spent on other improvements. There is little point in making your site faster if it is already fast enough.

Your manager, client, or marketing department may have ideas about what constitutes "fast enough". Alternatively, visit the page Website Response Times at http://www.useit.com/alertbox/response-times.html to gain inspiration for setting performance goals.

Ok, you've been monitoring your site, and found it is getting too slow. What now?

Iterative improvements

Because websites, web servers, and browsers are such complex beasts, it pays to make improvements in a deliberate fashion. Hence, these two golden rules:

  • One change at a time: Because multiple changes can affect each other in surprising ways, life will be much easier if you implement and evaluate changes one-by-one.

  • Test, test, test: You don't know whether your change really is an improvement until you have tested it thoroughly. Make sure that performance after the change is better than performance before the change, and be ready to roll back your changes if it isn't; what works for other sites may not work for your site.

This process makes your site run faster. An iterative process is shown as following:

  1. 1. Record the current performance.

  2. 2. Diagnose the performance problem identify the single most important bottleneck.

  3. 3. Fix that one bottleneck (remember, one change at a time).

  1. 4. Test your change. Has performance improved? If it didn't, roll back your change and come up with a better fix. If it did, go back to step 1.

As a result of this, making your site faster is an iterative process:

If you find bottlenecks that currently do not pose a problem, but will come back to bite you in the future, it may be good to fix them, now that they are clear in your head.

We can capture all this in a flowchart:

Monitoring services

If you search Google for "site monitoring service", you'll find lots of companies that will monitor your website's performance for you. They also alert you when the response time gets too high, indicating your site is down.

Here are a few of the monitoring services that offer a free plan at the time of this writing. Note that the descriptions below relate to the free plan. If you are prepared to spend a bit of money, check their websites for their offerings:

  • Pingdom:

    Pages you can monitor: 1

    Checking frequency: Once every 1, 5, 15, 30, or 60 minutes

    Checks from: United States, Asia, Europe

    Sends alerts via: E-mail, SMS, Twitter or iPhone

    Reporting: Detailed downloadable stats showing the result of each check

  • Mon.itor.us:

    Pages you can monitor: Unlimited (1 per contact e-mail address)

    Checking frequency: Once every 30 minutes

    Checks from: United States, Europe

    Sends alerts via: E-mail, SMS, Twitter, or IM

    Reporting: Weekly reports, real-time graph

  • dotcom-monitor:

    Free 30-day trial

    Pages you can monitor: Unlimited

    Checking frequency: Once per minute

    Checks from: United States, Europe, Israel

    Sends alerts via: E-mail, Phone, SMS, Pager, SNMP

    Reporting: Daily, weekly, and monthly e-mails, extensive online reports, and graphs

  • 247webmonitoring:

    Pages you can monitor: 5

    Checking frequency: Once every 15, 30, or 60 minutes

    Checks from: United States

    Sends alerts via: E-mail

    Reporting: Real-time graph

Now that we've seen the process of assuring satisfactory performance, let's focus on how to diagnose and fix performance problems. After all, that is what this book is all about.

You have been reading a chapter from
ASP.NET Site Performance Secrets
Published in: Oct 2010
Publisher: Packt
ISBN-13: 9781849690683
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image