|
Posted by Toby A Inkster on 03/20/07 16:01
Marian Steinbach wrote:
> I just did a very simple comparison of "manual XML writing" and
> XMLWriter (which is supposed to be very fast). Surprisingly to me,
> XMLWriter is even twice as fast as manual XML writing.
It is somewhat surprising. Skimming through the code, as far as I can see,
the only think that might be slowing it down is your use of:
."\n";
to append a line break to strings occasionally. This obviously makes the
generated XML a lot more usable, but it also forces PHP to attempt
interpolation on the string, as it's double-quoted. Does removing these
line breaks speed things up?
If these line breaks *are* what's responsible, I'm going to have to
seriously rethink my own (X|HT|XHT)ML generating code!
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|