I finally broke down and wrote an extension to PHP to access the XFS extended attributes directly. In previous versions this was done by shelling out to the system and calling the attr command. Now there are native PHP functions (see README file in php_module) that access the extended attributes. See the INSTALL file under php_module for instructions on how to add the extension. Besides a tremendous performance boost, the extensions also help clean up the code a little bit.