When optimizing an application, you will start by identifying the most time-consuming functions, especially along the application's critical path. As stated in a previous chapter, most of those functions will be I/O functions as these are always the most expensive operations for a computer to execute. Most of the time you will see the possibility to optimize loops and reduce the number of system calls, but you will soon realize that I/O operations remain costly no matter what optimizations you wish to bring to them. Sometimes, though, you might run into very slow PHP structures that can simply be replaced with faster ones, or you may realize that poorly designed code can easily be refactored to be less ...
Identifying more possible optimizations
Get Mastering The Faster Web with PHP, MySQL, and JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.