phpmysqlreal-timeeaccelerator

PHP eAccelerator and real-time data


I have this application written in PHP, I'm considering on using eAccelerator for optimizing the application. My dilemma is that, this application works with real-time data (daily there are around 6 to 8 million records inserted).

Until now I haven't used any optimizing tool to speed up my applications. So my question is, will eAccelerator cause any problems with real-time data (e.g. display old data instead of the current one)?


Solution

  • No! From the http://eaccelerator.net/ (my emphasis):

    eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. ... eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it.

    eAccelerator only optimizes and caches your PHP files (thus eliminating most of the usual overhead when compiling static PHP files for each request). Dynamic data (e.g. DB, file system, remote ressources) are not cached (at least, not by eAccelerator). Therefore, your data will still be "fresh" from the requested ressource.


    If, at a later point in time, you need to cache (some of) the real-time data (making them not entirely "real time") you could have a look at technologies like Memcached. This is specifically designed "... to reduce the number of times an external data source (such as a database or API) must be read."