Hacker News new | ask | show | jobs
by phpnode 5292 days ago
those charts don't say whether APC is enabled, which leads me to suspect that it isn't. APC is an opcode cache that greatly enhances php performance, no one runs a high traffic website without using APC
2 comments

eAccelerator and XCache also do the same(ish) thing. APC usually helps way more on subsequent requests. While APC /can/ help a lot, it's not the magic speed bullet that some make it out to be -- if your app is a bodged mess of Joomla and stuff that you got outside developers to write for you, it'll probably still run like garbage with APC enabled.

Getting a bit off topic here, but one of the biggest performance killers I've seen is PHP devs writing Really Awful SQL(tm). Even beyond stuff like failing to use PDO and prepared queries to avoid SQL injections, if you look around you'll find tons of just really abysmal SQL. Typical problem: someone is using an oper in SQL that forces MySQL to not use indices. This absolutely kills performance and you typically won't notice it as a developer unless you're pre-populating your database with a large "real-world" dataset and doing proper performance testing.

Did not know about APC...nice. Does APC just compile it after the first time and save it in memory? Can you use APC to create a packaged compiled file?
bytecode caches (like APC) store the bytecode on the fly in memory. you can't create somthing like a "binary" file.

edit: at least they're not intended to create "binaries". you can probably mess around with APC and make php look and behave like a compiled language. but you won't gain any notable speed improvements beyond the on the fly caching.

edit2: you can store php projects in a jar like file, caller phar. http://php.net/phar