News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jim Plush's Blog:
Do you use debug statements in PHP? Speed them up by 85%
August 17, 2006 @ 20:45:14

Jim Plush shares a handy hint he's come upon while working with debug statements in his code - how to speed them up by 85%.

For many of us we have a configuration file for our web applications. In that configuration file there is usually a DEBUG constant that we can turn on to print out helpful debug statements on the screen or to a flat file.

If you do something similar to get data from your applications consider adding a test for the debug value before calling the function directly. If you do you'll get about an 85% speed gain when debug is turned off. Which probably will be 98% of the time your application is running.

He includes sample code to illustrate along with some of the testing parameters that he followed to get at the 85% mark he did.

0 comments voice your opinion now!
debug statement speed increase write file benchmark debug statement speed increase write file benchmark


blog comments powered by Disqus

Similar Posts

CodeSnipers.com: Ruby on Rails makes nice with PHP

Secunia.com: CMS Mundo SQL Injection and File Upload Vulnerabilities

Jim Plush\'s Blog: MyBic AJAX 0.3 released with EASY FORMS & Debug!

DeveloperTutorials.com: PHP Debugging with Zend Studio

Hasin Hayder's Blog: Counting occurrence of a word in a String - Benchmarking of PHP functions


Community Events





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


tips language code introduction conference api symfony interview development bugfix community zendserver series framework voicesoftheelephpant list release deployment podcast laravel

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