Re: [Config] Extremely slow

From: Date: Tue, 25 Nov 2003 19:56:44 +0000
Subject: Re: [Config] Extremely slow
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9140@lists.php.net to get a copy of this message
<mj@php.net> wrote : > On Tue Nov 25, 2003 at 07:2659PM +0100, Thorsten Suckow-Homberg wrote: >>> Parsing XML is slow in PHP. Furthermore, the Config package is slow and >>> therefore should be used only to manipulate configuration files, not to >> read >>> them. If you want a fast solution you can try to wait for PHP 5 and its >>> SimpleXML parser or have your configuration file be converted by Config to >> a >>> PHP array and then access this array directly in PHP (a lot faster). >> >> Thx for the answer, but when I mean "slow" I mean "really" slow: >> Approximately 8 sec for 700 lines ox XML? Is that the way it should be? > > Don't think so. You should open a bug report for this on > http://pear.php.net/bugs/ so that the maintainers can more > easily keep > track of the stuff. Slow code is not buggy code. PHP is slow compared to C, that's not because it's buggy. Still, you can send me your XML config file (remove private info of course) so I can test it and see where the code could be improved. There is a lot of recursion in Config and maybe that's another reason why it's slow. Bertrand Mansion Mamasam

« previous php.pear.general (#9140) next »