News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Derick Rethans' Blog:
Xdebug's Code Coverage speedup
September 23, 2011 @ 09:56:33

Derick Rethans has a new post to his blog today talking about some work that's been done to speed up XDebug's code coverage generation. Changes in the coming 2.2 release have some improvements that make things perform better and put less stress on PHP in the process.

Code coverage tells you how much of your code base is actually being tested by your unit tests. It's a very useful feature, but sadly, it slows down PHP's execution quite a lot. One part of this slowdown is the overhead to record the information internally, but another part is because I have to overload lots of opcodes. (Opcodes are PHP's internal execution units, similar to assembler instructions) They are always overloaded even if code coverage is not used, because it's only safe to overload them for the whole request.

These changes were from a combination of contributions from Taavi Burns and a new ini setting that will allow you to enable or disable the code coverage in XDebug. Benchmarking shows a good amount of time reduction in coverage runs - dropping anywhere from a few seconds to over a minute. He also mentions the idea of "modes", shortcuts to predefined settings for different types of reporting (like "profiling" or "tracing").

0 comments voice your opinion now!
xdebug codecoverage speed improvement opcode contribution benchmark



Brian Swan's Blog:
Performance Tuning PHP Apps on Windows with Wincache
July 11, 2011 @ 10:04:45

Brian Swan has a new post to his blog sharing some tips you can use to get the best performance out of your Windows applications by tuning Wincache.

A few weeks ago I wrote a post that showed how to improve the performance of PHP applications on Windows by using the IIS output caching module. Using the output caching module can have significant positive impact on application performance since pages are served from cache without executing any PHP code. However, this very strength can also be a drawback depending on how your application is built. Because entire pages are cached, using output caching may not be ideal for pages that have multiple data sources.

He points to the Wincache extension as an alternative to the full-page caching with it's built-in opcode caching (you get for "free" just by installing). He mentions this and a few other features that come with it like the ability to cache to a file and to normalize file paths for more efficient seeking of files. He also focuses on partial caching with a specific example of caching user data for use through out the application. A bit of code and some screenshots are included to show the performance boost this can give.

0 comments voice your opinion now!
performance wincache windows extension file opcode


Zend Developer Zone:
Using APC with PHP
November 02, 2010 @ 11:51:44

The Zend Developer Zone has published a new in-depth tutorial from Vikram Vaswani about using APC and PHP to get the best performance out of your application. Using this opcode caching tool can greatly speed up the execution of your site with almost no effort on your part.

dding APC to an application usually results in improved application response times, reduced server load and happier users. In this article, I'll introduce you to APC, guiding you through the process of installing and configuring it and showing you a few examples of how it works. I'll also walk you through the APC administrator interface, which lets you view APC performance in real time, and show you how you can use it with the Zend Framework

He shows you every step of the way - installation, configuration (complete with some screenshots) and the web-based interface you can enable to see the statistics about how the cache's performance is and what requests it's been handling. He mentions other abilities APC has like array and object caching, caching closures and finally a real-world example of using it to cache the results of a Twitter search request (in a Zend Framework environment).

1 comment voice your opinion now!
apc opcode cache tutorial optimize


Arun Gandhi's Blog:
15 methods to speed up PHP based website's performance
June 25, 2010 @ 09:31:27

On his blog today Arun Gandhi has posted an "all in one place" list of technology that you can use to help speed up your site overall without too much effort on your part.

PHP is great for writing quick dynamic stuff for your website. Just a couple of lines of code can be written in 2 mins to insert or retrieve data from db. But with ease there is also some pain… the downside is that each request for a dynamic page can trigger multiple db queries, processing of output, and finally formatting to display on browser. This process can eventually be slow on larger sites or slower servers.

There's lots of options here for all different levels of the code - opcode caching to speed up repetitive operations, data caching at the PHP layer, caching plugins and template caching.

0 comments voice your opinion now!
website performance opcode template cache plugin


Derick Rethans' Blog:
More source analysis with VLD
February 23, 2010 @ 10:49:26

Derick Rethans has been working on some updates to a tool he's developed, VLD, to make it more helpful and effecting in optimizing the opcodes in your scripts and find the dead opcodes and paths. He talks about these updates in this recent post.

Recently I've been working on some new functionality to visualise all the code paths that make up each function. These new routines sit on top of the routines that do dead code analysis. These new routines sit on top of the routines that do dead code analysis. Every branch instruction (such as if, but also for and foreach) is analysed and a list of branches is created. [...] Once all the branches and their links are found, another algorithm runs to figure out which paths can be created out of all the branches.

He illustrates with a few examples, showing both the command that was executed and the resulting output with the new path information of a simple test file using a "for" loop and an "if/else" conditional.

0 comments voice your opinion now!
vld opcode visualize dead path


Christian Flickinger's Blog:
WinCache, Apache and a pretty graph!
February 12, 2010 @ 13:36:47

Christian Flickinger has written up a new blog post today showing some of the benchmarks he's worked up around the performance of various caching tools with the WinCache caching tool from Microsoft coming out as a leader.

The [WinCache] documentation makes no mention of Apache, only IIS. I decided to give it a try, and to my amazement, WinCache worked in Apache on Windows. After that I decided to compare the performance of WinCache with the other available options for Windows+Apache.

He defines his testing environment - hardware, software and the different opcode caching tools - and includes his testing technique. His results, measured in requests per second, are interesting but show that, for his configuration, the WinCache tool's performance topped the others on Windows.

0 comments voice your opinion now!
opcode cache wincache apache graph benchmark


IBuildings Blog:
PHP Caching on Windows A managers perspective
November 29, 2009 @ 09:50:42

On the IBuildings blog Cal Evans has taken a look at the Windows caching technology (some recently released) from a management perspective and where it fits in the overall Windows caching toolsets available.

As PHP extends its reach further into corporate networks, IT managers have yet another technology that they have to understand so that they can properly deploy. In many situations, PHP code is being developed that - running on its own - creates a bad user experience because of the nature of the language. [...] Much of this delay, and the user unhappiness that always accompanies it, can be mitigated with the proper opcode caching solution. The list in this article was compiled to help managers understand what their options they have. These are the most popular or recent PHP opcode caching solutions.

He lists three of the more popular choices - the Alternative PHP Cachie, Zend Optimizer+ and the WinCache - touching briefly on what each has to offer.

0 comments voice your opinion now!
windows manager perspective opcode


Abhinav Singh's Blog:
PHP tokens & opcodes 3 useful extensions for understanding the Zend Engine
November 24, 2009 @ 11:32:31

Abhinav Singh has a recent post to his blog looking at three extensions that you can use to help understand the inner workings of the core Zend Engine.

"PHP tokens and opcodes" - When a PHP script is executed it goes through a number of processes, before the final result is displayed. These processes are namely: Lexing, Parsing, Compiling and Executing. In this blog post, I will walk you through all these processes with a sample example. In the end I will list some useful PHP extensions, which can be used to analyze results of every intermediate process.

He touches on the steps the average PHP script takes in its processing - lexing, parsing/compiling and the actual execution of the opcodes. The tokenizer, parsekit and VLD (Vulcan Logic Disassembler) extensions can help you get down into the nuts and bolts of the language and the engine that makes it work.

0 comments voice your opinion now!
zendengine extension lexer compile opcode


Derick Rethans' Blog:
PHP's two-pass compiler
January 28, 2009 @ 12:06:34

While working on an issue with debugging a script of his via XDebug, Derick Rethans was reminded of something that is an integral part of the PHP language - its two phase compiler.

During the first pass, it will find out to which opcode it needs to jump in the jump instructions. However, the PHP engine (and Xdebug) expects a memory address to jump to while executing your script. In the second pass, the compiler will then go over the generated opcodes and calculate the memory address to jump to from the jumps to opcode numbers.

Because of the way that XDebug was handling the checks (with the user-defined error handler) and how the opcodes inside of PHP are handled, the user-defined handler happened in between the first and second phases and the latter run couldn't find the resources it was looking for, thus the crash.

0 comments voice your opinion now!
two phase compiler xdebux vld userdefined error handler opcode resource


Zoe Slattery's Blog:
PHP Opcodes
September 04, 2008 @ 13:46:42

In a recent blog post Zoe Slattery took a look at opcodes in PHP, specifically related to performance increases.

After one particularly frustrating day [looking at how the Zend engine works] I asked a colleague (Andy Wharmby) about the issue I was looking at. Then a miracle happened - he'd not only looked at it but had documented it (and many other things) in a set of charts.

She has linked to the charts (Open Office format) for the results of some tests her friend had already run. They're a bit out of date and some parts might be inaccurate, but they're still a good start.

0 comments voice your opinion now!
opcode performance zend engine openoffice chart test



Community Events





Don't see your event here?
Let us know!


symfony2 manifesto introduction test application podcast interview release language opinion security series phpunit conference unittest development custom community api framework

All content copyright, 2012 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework