[nycphp-talk] Using APC to improve performance.
Konstantin Rozinov
krozinov at gmail.com
Mon Mar 30 20:03:48 EDT 2009
Hi folks,
I recently installed APC (http://pecl.php.net/package/APC) to see how
it works. Currently, I'm just using the opcode (file) caching and
already the response time is about 4x faster. No code changes were
required and it was as easy as just enabling APC in php.ini. Now I'm
interested in trying out the "user variable caching" to see if I can
get any more improvement in response time. I know that this will
require code changes and the use of the APC functions (like apc_add(),
apc_fetch(), etc.)
For example, I have a configuration file, which has about 400+ defined
constants for the web application I'm working on. I've read in the
APC documentation and elsewhere that define() is notoriously slow (not
sure why??).
1. Will storing these constants in APC help?
2. How would you store these constants? Just use apc_add()? Or use
apc_ load_ constants() (the APC docs say that this doesn't work as
well as expected?!)?
3. If I'm already using the opcode (file) caching, will it make any
difference store the 400+ defined constans in APC?
4. Any links to really good APC howtos or tutorials would be greatly
appreciated!
Thanks for any help and tips.
Konstantin
More information about the talk
mailing list