Re: Whats faster? simplexml_load_string or simplexml_load_file?
| From: | Daniel Brown | Date: | Mon, 10 Mar 2008 15:16:16 +0000 |
| Subject: | Re: Whats faster? simplexml_load_string or simplexml_load_file? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271204@lists.php.net to get a copy of this message | ||
On Sat, Mar 8, 2008 at 11:18 PM, Lamonte <php4food@gmail.com> wrote:
> I was wondering this because at the moment using simplexml_load_file
> makes my script go at about 2 seconds per page load, in a loop. Then I
> created a cache system so it doesn't keep loading the xml file, but I'm
> wondering if theres a faster way to load xml QUICKER, is it possible
> with "file_get_contents" and "simplexml_load_string" ?
Yes, and you may notice performance enhancements because you're
now going to parse the XML data line-by-line as opposed to parsing the
entire file at once.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>