更新时间:2021-06-25 21:17:19
封面
版权信息
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Foreword
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Faster Web – Getting Started
What is the Faster Web?
The Faster Web and performance
Measuring the Faster Web
Before Measuring
Benchmark testing and profiling
Practical prerequisites
Understanding Apache Bench (AB)
Understanding Siege
Installing and configuring useful tools
Profiling PHP – xdebug Installation and Configuration
SQL – Speed Testing
JavaScript – Developer Tools
Summary
References
Continuous Profiling and Monitoring
What is Blackfire.io?
Installing and configuring Blackfire.io
Profiling manually with Blackfire.io
Performance testing with Blackfire.io
Monitoring performance with the TICK Stack
Harnessing the Power of PHP 7 Data Structures and Functions
PHP 7 optimizations
Strict typing
Immutable and packed arrays
Memory allocation of integers and floats
String interpolation and concatenation
Parameter references
Identifying more possible optimizations
Functional programming and memoization
Reference
Envisioning the Future with Asynchronous PHP
Asynchronous non-blocking I/O calls
Multithreading with pthreads
Using the ReactPHP library
Measuring and Optimizing Database Performance
SQL query performance
The structure of indexes
The execution plan
Basic query optimization
The performance schema and advanced query optimization
Advanced benchmarking tools
DBT2
SysBench
Querying a Modern SQL Database Efficiently
Modern SQL
Definition
WITH and WITH RECURSIVE
CASE
OVER and PARTITION BY
OVER AND ORDER BY
GROUPING SETS
JSON clauses and functions
FILTER
LATERAL queries
JavaScript and Danger-Driven Development
The global object and local variables
Avoiding global variables
Evaluating local variables
Avoiding bad idioms and keeping an eye on the very bad parts
Bad idioms
Bad constructs – the with statement
Bad constructs – the eval statement
Bad constructs – the try-catch-finally construct
Avoiding inefficient loops
Linters and strict mode
Using the DOM efficiently
Modifying the document tree
Updating an invisible element
Making style changes
Searching for nodes
Inspecting a large number of nodes
Managing references from one document to another
Caching DOM values
Structuring and loading a JavaScript application