Zend Framework Performance Zend_Loader
This post is related to the last post on PHP Accelerators and utilizing the Zend Framework. I changed out the Zend_Loader::loadClass() implementation that I was utilizing to load all of the classes and found that it drastically slowed things down. I am not just talking slightly, but a massive change in performance.
In the previous post APC was the fastest with 900 requests. After taking the Zend_Loader out of the picture in the bootstraps and moved them to a require_once function (I attempted just simply require, but that caused some issues likely due to some conflicts with the Zend Framework requiring their own files already in specific instances.
The APC requests went from 914 to 27,411 with the same ab bench.
Concurrency Level: 10 Time taken for tests: 60.3722 seconds Complete requests: 27411 Failed requests: 0 Write errors: 0 Total transferred: 5976688 bytes HTML transferred: 0 bytes Requests per second: 456.82 [#/sec] (mean) Time per request: 21.890 [ms] (mean) Time per request: 2.189 [ms] (mean, across all concurrent requests) Transfer rate: 97.26 [Kbytes/sec] received
If you don’t know it by now, just for clarity, DO NOT USE Zend_Loader in your applications unless you would like to see it drastically slow down.