Home arrow Zend arrow Page 4 - Improving Performance

Code caching (Acceleration) - Zend

Your web presence is growing! Traffic and usage are escalating and you have to maintain a superior level of performance. The state of growth unfolds many opportunities but it also holds challenges as a result of change. Not only does performance affect your operating costs, it also reflects directly on the end-user experience. The marketing and sales departments are probably saying that happier users directly increase sales.

  1. Improving Performance
  2. Static and Dynamic Web content
  3. Reverse Proxy cache
  4. Code caching (Acceleration)
  5. Client-side caching
  6. Caching conditions
By: Zend
Rating: starstarstarstarstar / 8
January 08, 2004

print this article



Code Acceleration is sometimes referred to as code caching. In fact it is very different from content caching because it caches the code and not the content. Code acceleration is at work when the server runs the script inside the PHP script engine.

By default, every time a PHP script is accessed, the script is parsed and compiled before it is executed. As long as the script does not change, parsing and compiling is redundant. Code caching maintains the compiled byte code version of the PHP script in memory, eliminating the need to parse and compile each time.

Code caching actively maintains the cached compiled scripts in a shared memory model, serving each process that is generated by the web server. For this reason, it is critical that the code accelerator be tightly integrated with the scripting engine, to ensure proper memory utilization and prevent failure.

Figure 3 - Code Acceleration
Code Acceleration

Query caching
In dynamic web sites, the database server is more likely to become the bottleneck since every query has to be processed and the quality of service drops dramatically under heavy load.

In query caching, the cache contains a list of recently executed queries and their results. Whenever possible, a new query is satisfied by results already stored in the cache, thereby avoiding potentially large data scans.

This technique benefits web applications that run complex, process intensive queries. For web applications that run frequent small-scale queries, the latency caused by the travel time over the network will most likely overshadow the benefit from query caching.

Figure 4 - Query caching
Query Caching


>>> More Zend Articles          >>> More By Zend

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Taking the Zend Certified PHP Engineer Exam:...
- Quick Introduction to PHP 5
- PHP SOAP Extension
- Improving Performance
- PDFs with PHP part 2
- PDFs with PHP part 1
- PHP at Lycos
- Build Database Interfaces

Developer Shed Affiliates


Dev Shed Tutorial Topics: