Alexey Zakhlestin's Blog

Programming for Mac and Web

Love and Hate and Everything…


I love APC. Everyone who read George Schlossnagle’s “Advanced PHP Programming” loves APC. I love it, because it makes “enterprise” sized applications run twice faster. I love it because it gives me cheap and convenient shared memory cache, so my app runs even faster. I love it because it will be a part of PHP6, which gives me hope, that it won’t be abandoned, and, probably, will be even faster some day. The best thing about it, is that you don’t need to make any changes to your code. You just enable/install php-extension and instantly getting 50-200% increase of execution time.

This moment, you are probably typing “pecl install APC” on your test-servers, running first benchmarks and drawing presentation-diagrams for your boss. But wait just a moment before sending her email, because…

…well, oh God, I hate APC. I hate it because of a little-little small bug, which was reported so long ago, and is still not fixed. This bug just makes APC close to unusable for “enterprise” sized applications (which, as I already mentioned, are getting the biggest speed-gain from APC). The worst thing about this bug, that it is possible to not mention it for quite some time. Some parts of web-app will continue to work (actually, they will work very fast), but some other pages will leave you with a strange message in the error-log about missing the parent class at the point in your code, where you are 100% sure to have it defined.

And then you know, that you are turning APC of at this exact minute, because you don’t want your boss to see that error. And you put all those nice diagrams in the furthest folder and start to hate APC for ruining a beautiful dream you just had.


I hope it is not

George, Rasmus, anyone — please fix APC’s bug #5314 as soon as it is possible. Let our dream come true.

p.s. I saw Rasmus at PHP Conference in Moscow on 25-26 of may and he just repeated me, that fixing the bug “will take some time”.