Performance Issue with Zend Framework

I added Zend Framework to my php project 1 month ago. I use Zend_Measure and Zend_Locale to format numbers to a good locale.

I am using php 5.3 with APC and Zend Framework 1.11.

I have a major problem with exporting raw data from my database. Excluding the mysql query time, which is negligible, php export with record formatting takes 3.5 seconds per 1000 records. All this time is wasted on Zend_Locale_Format::toNumber(). How can I improve the performance of this?

This test was done on my own computer (Macbook pro i5). On our production server, it takes 70 seconds per 1000 entries !!! This server is a 2GB rackspaceCloud Cloud server with centos and only our web application works.

There are 20 factors between a MacBook and rackspace server performance. Is my macbook so powerful? I do not think so...


UPDATE

After performing any profiling, it appears that the bottleneck is Zend_Cache_Backend_File->_fileGetContents. It is used by default Zend_Cache_Backend_File. How to configure Zend Framework to use Zend_Cache_Backend_Apcor Zend_Cache_Backend_TwoLevels? Perhaps this can improve performance ...

+3
source share
1 answer

Have you installed a global cache for Zend_Locale? Check the document page and scroll down.

APC. APC, XCache, . .


, Zend_Locale Zend_Local_Format, Zend_Locale::setCache($cache) Zend_Locale_Format::setOptions(array('cache' => $adapter)). .

+5

All Articles