Lampwrights Forum > Linux, Apache, MySQL, PHP > PHP
Register Community Today's Posts Search

Reply
 
Thread Tools
07-18-2010, 08:48 PM   #1
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
What is opcode caching?

When a PHP script is called by a users browser the process is as folllows:
  1. User requests page
  2. Web server compiles the PHP script (interprets)
  3. Executes the compiled version of the page
  4. Outputs the data
When we think of normal applications such as programs on your desktop, the compiling step is not one we normally consider. Usually the applications we use are already compiled. However, scripting languages such as PHP, Perl, Ruby, etc., are compiled on demand or interpreted. There are subtle differences between compiling and interpreting but that is for another day.

As you can imagine, converting source code to machine code (opcode) can be resource intensive. Opcode caches will store the opcode in a cache and execute it instead of constantly recompiling the source code. This basically eliminates step 2 in the above list and seriously speeds up your site.

There are many opcode caches out there such as Xcache, APC, etc.. No large site should be without one!
Jeff is offline   Reply With Quote

Reply

Tags

configuring php

,

php

,

php opcode caching



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2024, vBulletin Solutions, Inc.