The Bug Genie team blog

What's cooking behind the scenes of The Bug Genie

PHP optimizers and The Bug Genie – revisited

with one comment

As we are seeing more issues with php optimizers interfering with the core functionality of The Bug Genie, we’d like to post a little clarification.

First of all, we do not have an issue with optimizers. They exist for a reason, and we will do our best to not have our code break when optimizers are used – for whatever reason issues may occur ( phpinfo() can confirm if you are using an optimizer – look for “eaccellerator” or “optimizer”).

However – and this is important – not all optimization techniques are valid, and not all optimization techniques are non-intrusive. One of the techniques used by php optimizers (e.g. eaccellerator) is to remove php docblocks before the php compilation step. This optimization “feature” is highly controversial, and it is intruding on a core php feature – php docblocks are a part of the php language. Removing php docblocks will cause applications to malfunction.

There are several php projects other than The Bug Genie already relying on this php language feature (the ability to read php docblocks at runtime):

  • Doctrine 2
  • Zend Framework
  • PHPUnit

To read more about this “optimization” technique controversy, I recommend having a look at these two links:
http://wildlyinaccurate.com/eaccelerator-and-doctrine-2/
http://blog.feryn.eu/2010/12/zend_soap_autodiscover-eaccelerator-causes-trouble/

The last blog post also contains information on how to disable this particular eaccellerator “feature” for certain files, and how to disable eaccellerator php docblock removal completely.

Unfortunately, we cannot do anything about this issue, as it is out of our control.

Written by Daniel André

February 7, 2011 at 17:56

One Response

Subscribe to comments with RSS.

  1. […] This post was mentioned on Twitter by Daniel André, The Bug Genie team. The Bug Genie team said: PHP Optimizers and The Bug Genie v3: http://bit.ly/fvX21b #eaccellerator #docblocks #prematureoptimization […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: