Re: Persistent PHP web application?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've done some benchmaring and it is quite fast, specially compared to talking to the DB. Also, phpbeans provides a daemon that can give you the solution you are looking for, I believe.

Adrian


Rasmus Lerdorf wrote:

Adrian Madrid wrote:

I think I understand where you're coming from. I've had a similar problem and the best solution I've found is eAccelerator (previously known as Turck MMCache). What EA does is keep the bytecodes PHP compiles inshared memory so next time you need that script PHP doesn't need to recompile, EA returns the bytecode from SHM. Now, since PHP scripts are compiled and saved in SHM all I need to do is /save/ the data that does not change often but requires a lot of queries as code (an array inside a script) and include it whenever I need the data. No recompiling, no need to touch the DB again, pure speed. I hope all this helps you. I personally don't need extra processes and stuff like that but if you really want all that you can take a look at phpbeans.


What you are talking about is opcode caching. While it certainly speeds things up, it can be done much faster. When you cache a file that contains a large PHP array definition, all you are caching are the instructions to create that array. On every request these instructions need to be loaded from shared memory and executed in order to recreate the array. This can be quite slow. What we are discussing here are ways to avoid recreating the array on every request which is quite different.

-Rasmus



--
Adrian Madrid
HyperX Inc. Mobile: 801.815.1870
Office: 801.566.0670 aemadrid@xxxxxxxxxxxxxxx www.hyperxmedia.com


9000 S. 45 W.
Sandy, UT 84070

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux