Performance of server-side DOM?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I've been toying around, lately, with using PHP's DOM API (specifically, domxml because I'm still using PHP4) for doing some of my server side dynamic pages, instead of the 'classic' method of outputting a serial stream of html dynamically generated with, e.g. php print() statements. The reason this is attractive to me is that, programmatically, it makes it easier to seperate logic from presentation. I realize that PHP has available, through PEAR and otherwise, various templating systems that attempt to address that need, but I've found some of the templating systems, at least, to be somewhat confusing, whereas the DOM seems pretty straightforward to me.

But, I've wondered about the performance implications of my would-be method. Namely, I would normally start by reading in an html 'template' file with the function domxml_open_file, modify it to my hearts content with DOM methods, and then use DomDocument->html_dump_mem() to re-serialize the html and send it to the web-browser.

 Is this horribly inefficient, or just a small, reasonable overhead?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux