Pro PHP Application Performance

Author: Armando Padilla & Tim Hawkins
Publisher: Apress, 2011
Pages: 350
ISBN: 978-1430228981
Aimed at: PHP web developers
Rating: 3
Pros: Contains some useful ideas
Cons: Doesn't really deal with PHP optimization
Reviewed by: Mike James

Show me the programmer who wouldn't like their PHP, or any language, program to go faster. So why aren't there a lot of best selling books on optimization?

 

The reason is, of course, that optimization is hard. You can spend ages on fine tuning only to trim off a few percent. PHP is a particularly difficult language to optimize. The reason is that it is interpreted and it is mixed up in the way that the web server actually serves the page that it constructs. So any book that offers to help is indeed a potential best seller.

Banner

 

Chapter 1 starts off with a look at benchmarking - Apache in particular and web pages in general.  Chapter 2 then dives into optimizing web pages. Yes PHP pages are web pages but this is not about PHP optimization - it is mostly about using Firebug, and JavaScript compression.  Chapter 3 finally reaches the subject of PHP optimization and it's over before you can blink. It provides an interesting discussion of using the command required, optimizing loops, file access and property lookup. Then it goes on to using trace utilities to find out what is happening.

Chapter 4 looks at Opcode Caching, which is a fairly easy to use way of speeding up your code but the increase in speed isn't much. The same is true of variable caching which is covered in Chapter 5. 

The remainder of the book is about general issues in web optimization rather then specific PHP topics. Chapter 6 covers choosing the right web server. Chapter 7 is on optimizing the web server - mostly Apache. Chapter 8 is about optimizing MySQL and that's it - end of book.

The chapters dealing with general issues of optimization are quite good if you don't already know about the topics, but a book on PHP optimization should have more specifically on PHP.

My guess is that there simply isn't enough to fill a book focused on nothing else and so the need to go off topic into general issues of optimizing web page delivery no matter how the pages are created. There are PHP optimization techniques not covered by the book that effectively take PHP out of the loop altogether in many cases.

Systems such as Joomla have cache modules which retrieve the entire page that the PHP generates from the cache if it is available. Of course not all PHP pages can be cached in this way and you can set a time limit for how long a page lives in the cache to control how this works. For pages that remain fresh for a few hours this technique is very effective and it can be implemented in ad-hoc and custom PHP systems quite easily.

Overall this is a book that you might find useful if you don't know about basic web optimization techniques but if you are looking for something to double the speed of your web site you are probably going to be disappointed.


Banner


Expert Performance Indexing in Azure SQL and SQL Server 2022

Author: Edward Pollack & Jason Strate
Publisher: Apress
Pages: 659
ISBN: 9781484292143
Print: 1484292146
Kindle: B0BSWH65ST
Audience: DBAs & SQL devs
Rating: 4 or 1 (see review)
Reviewer: Ian Stirk 

This book discusses indexes, a primary means of improving performance in SQL Server, how does  [ ... ]



Deep Learning (No Starch Press)

Author: Andrew Glassner
Publisher: No Starch Press
Date: July 2021
Pages: 750
ISBN: 978-1718500723
Print: 1718500726
Kindle: ‎ B085BVWXNS
Audience: Developers interested in deep learning
Rating: Mike James
Reviewer: 5
A book on deep learning wtihout an equation in sight?


More Reviews

Last Updated ( Tuesday, 03 May 2011 )