From 2b8cfcaab29b361f0231bf5d4ab6aa17a6bd5d61 Mon Sep 17 00:00:00 2001 From: Roman Marintsenko Date: Tue, 10 Jul 2012 18:14:36 +0300 Subject: [PATCH 1/4] added caching section, added bytecode caching sub-section --- _posts/10-01-01-Caching.md | 3 +++ _posts/10-02-01-Bytecode-Cache.md | 17 +++++++++++++++++ ....md => 11-01-01-Libraries-and-Frameworks.md} | 0 ...01-01-Resources.md => 12-01-01-Resources.md} | 0 4 files changed, 20 insertions(+) create mode 100644 _posts/10-01-01-Caching.md create mode 100644 _posts/10-02-01-Bytecode-Cache.md rename _posts/{10-01-01-Libraries-and-Frameworks.md => 11-01-01-Libraries-and-Frameworks.md} (100%) rename _posts/{11-01-01-Resources.md => 12-01-01-Resources.md} (100%) diff --git a/_posts/10-01-01-Caching.md b/_posts/10-01-01-Caching.md new file mode 100644 index 0000000..d4d22c4 --- /dev/null +++ b/_posts/10-01-01-Caching.md @@ -0,0 +1,3 @@ +# Caching + +PHP applications on their own are relatively slow, but thankfully there's various (easy) ways to speed things up by using caching on various levels. \ No newline at end of file diff --git a/_posts/10-02-01-Bytecode-Cache.md b/_posts/10-02-01-Bytecode-Cache.md new file mode 100644 index 0000000..1c35c10 --- /dev/null +++ b/_posts/10-02-01-Bytecode-Cache.md @@ -0,0 +1,17 @@ +--- +isChild: true +--- + +## Bytecode Cache + +When PHP file is executed, under the hood it is first compiled to bytecode (also known as opcode) and only then, the bytecode is executed. +If PHP file is not modified, then bytecode will always be same, which means that compilation step is a waste of CPU resources. + +This is where Bytecode cache comes in - it prevents redundant compilation by storing bytecode in memory and reusing it on successive calls. +Setting up bytecode cache is a matter of minutes and your application will speed up significantly, there's really no reason not to use it. + +Popular bytecodes caches are: + +[APC](http://php.net/manual/en/book.apc.php) +[xCache](http://xcache.lighttpd.net/) +[Zend Optimizer+](http://www.zend.com/products/server/) (part of Zend Server package) \ No newline at end of file diff --git a/_posts/10-01-01-Libraries-and-Frameworks.md b/_posts/11-01-01-Libraries-and-Frameworks.md similarity index 100% rename from _posts/10-01-01-Libraries-and-Frameworks.md rename to _posts/11-01-01-Libraries-and-Frameworks.md diff --git a/_posts/11-01-01-Resources.md b/_posts/12-01-01-Resources.md similarity index 100% rename from _posts/11-01-01-Resources.md rename to _posts/12-01-01-Resources.md From 655e5ad2a1ed671b148c62678d97f6d51f5fe56a Mon Sep 17 00:00:00 2001 From: Roman Marintsenko Date: Tue, 10 Jul 2012 18:51:09 +0300 Subject: [PATCH 2/4] Fixed introduction wording a bit --- _posts/10-01-01-Caching.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_posts/10-01-01-Caching.md b/_posts/10-01-01-Caching.md index d4d22c4..cdcfdae 100644 --- a/_posts/10-01-01-Caching.md +++ b/_posts/10-01-01-Caching.md @@ -1,3 +1,4 @@ # Caching -PHP applications on their own are relatively slow, but thankfully there's various (easy) ways to speed things up by using caching on various levels. \ No newline at end of file +PHP is pretty quick by itself, but bottlenecks can arise when you make remote connections, load files, etc. +Thankfully, there are various tools available to speed up certain parts of your application, or reduce the number of times these various time consuming tasks need to run. \ No newline at end of file From 154a7677e91625459661b03d255d99fd3f07b2a7 Mon Sep 17 00:00:00 2001 From: Roman Marintsenko Date: Tue, 10 Jul 2012 19:04:20 +0300 Subject: [PATCH 3/4] spelling fixes --- _posts/10-02-01-Bytecode-Cache.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/10-02-01-Bytecode-Cache.md b/_posts/10-02-01-Bytecode-Cache.md index 1c35c10..fd535f1 100644 --- a/_posts/10-02-01-Bytecode-Cache.md +++ b/_posts/10-02-01-Bytecode-Cache.md @@ -7,11 +7,11 @@ isChild: true When PHP file is executed, under the hood it is first compiled to bytecode (also known as opcode) and only then, the bytecode is executed. If PHP file is not modified, then bytecode will always be same, which means that compilation step is a waste of CPU resources. -This is where Bytecode cache comes in - it prevents redundant compilation by storing bytecode in memory and reusing it on successive calls. +This is where Bytecode cache comes in. It prevents redundant compilation by storing bytecode in memory and reusing it on successive calls. Setting up bytecode cache is a matter of minutes and your application will speed up significantly, there's really no reason not to use it. Popular bytecodes caches are: [APC](http://php.net/manual/en/book.apc.php) -[xCache](http://xcache.lighttpd.net/) +[XCache](http://xcache.lighttpd.net/) [Zend Optimizer+](http://www.zend.com/products/server/) (part of Zend Server package) \ No newline at end of file From c84e461e7f4b823f2fa0f1b7c62b8f7ad0a6fdb7 Mon Sep 17 00:00:00 2001 From: Roman Marintsenko Date: Tue, 10 Jul 2012 19:10:21 +0300 Subject: [PATCH 4/4] added WinCache link --- _posts/10-02-01-Bytecode-Cache.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_posts/10-02-01-Bytecode-Cache.md b/_posts/10-02-01-Bytecode-Cache.md index fd535f1..5894fdc 100644 --- a/_posts/10-02-01-Bytecode-Cache.md +++ b/_posts/10-02-01-Bytecode-Cache.md @@ -14,4 +14,5 @@ Popular bytecodes caches are: [APC](http://php.net/manual/en/book.apc.php) [XCache](http://xcache.lighttpd.net/) -[Zend Optimizer+](http://www.zend.com/products/server/) (part of Zend Server package) \ No newline at end of file +[Zend Optimizer+](http://www.zend.com/products/server/) (part of Zend Server package) +[WinCache](http://www.iis.net/download/wincacheforphp) (extension for MS Windows Server) \ No newline at end of file