Skip to content

Improving Disk I/O in PHP Apps

For the release of Smarty 3.1.0 I refactored most of Smarty's disk access. As this optimization from September 2011 kept popping up questions on the Smarty forums, I finally felt the need to explain what I did. Although Smarty is the reason I discovered this, this post applies to PHP in general, not Smarty in particular. This post is all about laying the groundwork for you to realize two things:

  1. Your operations are not atomic
  2. Avoid accessing the hard disk unnecessarly
Continue reading "Improving Disk I/O in PHP Apps"