views:

43

answers:

2

Hi

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)?

+6  A: 

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."

jensgram
Now I only have to not crash the server.Thnx a lot!
Flakron Bytyqi
@Flakron Bytyqi Don't we all? :)
jensgram
A: 

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.

You can also use eAccelerator for this. See function eaccelerator_put() and eaccelerator_get() here.

EDIT: Too bad, These functions removed from the latest version of eAccelerator 0.9.6.

Yousf
Nice! Didn't know that.
jensgram