Re: memory allocation issues
| From: | Alan Knowles | Date: | Wed, 22 Oct 2003 00:27:21 +0000 |
| Subject: | Re: memory allocation issues | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22882@lists.php.net to get a copy of this message | ||
Robert - can you file this as a bug on PEAR, so it doesnt get forgotten.
Regards
Alan
Greg Beaver wrote:
Hi Alan, Alan Knowles wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comThis is a good point.. - should debug_backtrace be called all the time... Since dataobjects raises an error when it finishes each fetch.. It would get called alot.. if you are doing multiple queries.. Would it be better to disable backtracing by default, and turn it on using? PEAR::setDebugBacktrace(1); or something.. Thoughts????Backtracing is the most expensive operation in PEAR_Error, time-wise. It would be wise to move it out of the constructor and into PEAR::raiseError() and PEAR::throwError(). Making it optional is a good idea, as it is only used for finding bugs. I would rather call the new function PEAR::setExtremeDebug(), so that when users have problems, they can turn it on to get detailed information. Very rarely is the debug_backtrace() actually needed for any error, as most errors simply have nothing to do with the code that raises them. I'm also looking at some other changes to PEAR_Error once 4.3.4 comes out, I'd be happy to take care of this problem. Greg