On Wed, April 25, 2007 5:48 am, Henning Eiben wrote: > But as far as I understand, java kinda does the same thing, doesn't > it? Sort of, but not really... Java has a single central one giant process architecture. PHP has a shared-nothing architecture. They're at polar opposites on this bit. A PHP accelerator/cache wedges the Java-ness of caching the oft-used code in RAM, without the baggage of having everything in one giant process. > Java programs are being compiled into some intermediate language, and > this is being interpreted at runtime. So using an accelerator should > mimic the same setup for php. Yes, to a large degree. > Do you know any resource, describing how php works (like the thing > about > compiling opcode, and stuff)? How does php handle simultaneous > requests? Woof. There are TONS of resources out there, most of which are probably irrelevant to your actual problem, if you'd just profile the code and find out what's actually going on. > Are there multiple threads spawned? PHP is generally run in the context of Apache which runs multiple processes, not threads. Except in Apache 2, if you don't do pre-fork, which is dangerous if you're not 100% sure all the PHP extensions you choose to use are thread-safe. (Which nobody really really knows for sure.) And in Windows, maybe, where the whole concept of process/thread is of a different nature than Linux threads/processes. PHP itself does not spawn multiple threads nor processes, unless you install pcntl yourself and do that for your own application needs. PHP run under Apache lets Apache handle the process/thread splitting. Again, though, profile your code, please. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php