Re: Re: cvs: pear /XML_Transformer Transformer.php package.xml /XML_Transformer/Transformer/Driver OutputBuffer.php

From: Date: Tue, 09 Sep 2003 16:33:30 +0000
Subject: Re: Re: cvs: pear /XML_Transformer Transformer.php package.xml /XML_Transformer/Transformer/Driver OutputBuffer.php
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-21264@lists.php.net to get a copy of this message
Sebastian Bergmann wrote:
Alan Knowles wrote:
function debug($msg,$level=1) { if ($_GLOBALS['_DB_DATAOBJECT']['debug'] => $level) {
       .... print ...
       }
} but since it had to do the method call to debug, before printing anything out This is what i did that gave me the big speedup in XML_Transformer
I don't want to duplicate the check in _debug() everywhere I trigger a debugging message. XML Transformer's debugging mechanism is not limited to a simple boolean flag like $this->_debug that needs to be checked but also has debug message filtering. XML Transformer's old _debug() implementation was slower because of the sprintf() calls that were executed even when debugging was disabled. I still think the if check outside the _debug() call makes sense, since that boolean needs to be set before anything more complicated can happen right, and then you only get the futher overhead check for per tag debug when overall debug is one.
-josh

« previous php.pear.dev (#21264) next »