note 87853 added to function.simplexml-element-asXML

From: Date: Fri, 26 Dec 2008 21:41:57 +0000
Subject: note 87853 added to function.simplexml-element-asXML
Groups: php.notes 
Request: Send a blank email to php-notes+get-148549@lists.php.net to get a copy of this message
For generating XML, SimpleXML may not be the best choice, depending on your performance requirements: I needed to create a context stream (such as "logging://info") in order to push logging messages from a PHP webserver to an Enterprise Service Bus for routing and auditing. Since this is logging, high-traffic is expected and high performance XML generation is required. Unfortunately, SimpleXML just was not up to the task, although not nearly as back as using the XML_Serializer library. Detailed benchmarking results: The results are summarized below: Executing Heredoc Interpolation Test : ......... 0.00376201 ms/iter. Executing String Concatenation Test : ......... 0.00410941 ms/iter. Executing String Interpolation Test : ......... 0.00474050 ms/iter. Executing Output Buffering Test : ......... 0.00430031 ms/iter. Executing Output Buffering Include Test : ......... 0.04734261 ms/iter. Executing SimpleXML Element Test : ......... 0.02940309 ms/iter. Executing Indented SimpleXML Element Test : ......... 0.07175908 ms/iter. Executing XML Serializer Test : ......... 0.38576980 ms/iter. Executing CachedXML Serializer Test : ......... 0.37935431 ms/iter. Executing DOM Document Test : ......... 0.04152939 ms/iter. Completed 10 test cases of 10000 iterations each. real 0m9.746s user 0m9.593s sys 0m0.132s izepp@izepp-desktop:~/Desktop$ You can find the full source code for this performance test at: http://www.ianzepp.com/engineering/2008/12/ a-comprehensive-review-of-string-xml-performance.html ---- Server IP: 208.69.120.35 Probable Submitter: 208.92.203.1 ---- Manual Page -- http://www.php.net/manual/en/function.simplexml-element-asXML.php Edit -- https://master.php.net/note/edit/87853 Del: integrated -- https://master.php.net/note/delete/87853/integrated Del: useless -- https://master.php.net/note/delete/87853/useless Del: bad code -- https://master.php.net/note/delete/87853/bad+code Del: spam -- https://master.php.net/note/delete/87853/spam Del: non-english -- https://master.php.net/note/delete/87853/non-english Del: in docs -- https://master.php.net/note/delete/87853/in+docs Del: other reasons-- https://master.php.net/note/delete/87853 Reject -- https://master.php.net/note/reject/87853 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148549) next »