Pro JavaScript Performance: Monitoring and Visualization

Book description

Performance is a hugely important area of web development. If your site runs slowly, users are going to leave, and the problem only grows as your site gets more popular. Pro JavaScript Performance gives you the tools you need to keep your sites smooth and responsive no matter how many users you have.

Best practices are changing or becoming redefined continually because of changes and optimizations at the interpreter level, and differences in system configuration, and network speeds. This is exacerbated by the quickened release schedule that most browsers have adopted. Just as important as following best practices is the ability to measure your own performance, so that you can adjust as times change, and so that you can note the subtle nuances in your own code and define your own best practices by your own observations.

This book gives you the tools to observe and track the performance of your web applications over time from multiple perspectives, so that you are always aware of, and can fix, all aspects of your performance.

What you'll learn

  • Describes the different aspects of performance, and explores the tools for quantifying and improving performance

  • Provides tactical solutions for creating tools to measure the performance of your own web applications

  • Learn to apply performance best practices, and how to quantify your results

  • Who this book is for

    Pro JavaScript Performance is written for advanced JavaScript users and web developers. You will need a strong understanding of JavaScript to get the most from this book.

    Table of contents

    1. Titlepage
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Chapter 1: What is Performance
      1. Web Performance
      2. Parsing and Rendering
      3. Runtime Performance
      4. Why does performance matter?
      5. Instrumentation and Visualization
      6. The Goal of This Book
      7. Technologies Used and Further Reading
      8. Summary
    9. Chapter 2: Tools and Technology to Measure and Impact Performance
      1. Firebug
      2. YSlow
      3. WebPagetest
      4. Minification
      5. Getting Started with R
      6. Summary
    10. Chapter 3: WPTRunner—Automated Performance Monitoring and Visualization with WebPagetest
      1. Architecture
      2. Creating a Shared Configuration File
      3. Parsing the Test Results
      4. Complete Example
      5. Parsing the Data
      6. Plotting Load Time
      7. Plotting Payload and Number of HTTP Requests
      8. Open Source
      9. Summary
      10. Interview with Patrick Meenan of WebPagetest
    11. Chapter 4: perfLogger—JavaScript Benchmarking and Logging
      1. Architecture
      2. Let’s Code!
      3. Remote Logging
      4. An Example Page
      5. Charting the Results
      6. Open Source
      7. Summary
    12. Chapter 5: Looking Forward, a Standard for Performance
      1. W3C Web Performance Working Group
      2. The Performance Object
      3. Updating the Logging Functionality
      4. Performance Navigation
      5. Performance Memory
      6. High-Resolution Time
      7. Visualizing the New Data
      8. Summary
    13. Chapter 6: Web Performance Optimizations
      1. Optimizing Page Render Bottlenecks
      2. Lazy Loading
      3. Summary
    14. Chapter 7: Runtime Performance
      1. Cache Variables and Properties across Scope
      2. Comparison of Core JavaScript versus Frameworks
      3. The True Cost of Eval
      4. DOM Access
      5. The Cost of Nested Loops
      6. Summary
    15. Chapter 8: Balancing Performance with Software Engineering Best Practices and Running in Production
      1. Balancing Performance with Readability, Modularity, and Good Design
      2. Scorched-Earth Performance
      3. Next Steps: From Practice to Practical Application
      4. Summary
    16. Index

    Product information

    • Title: Pro JavaScript Performance: Monitoring and Visualization
    • Author(s):
    • Release date: October 2012
    • Publisher(s): Apress
    • ISBN: 9781430247494