Possible Duplicate:
Opening/closing tags & performance?
I am a big performance guy, and I like to have my code run as efficiently as possible. I don’t know if any of you know about liquid templating, and the style of code associate with that but often times they have tags like
{% if | class.method == 'true' %}
blah text
{% endif %}
I hate liquid, but I’ve kind of set up the same thing with php tags on my site.
<?php /*if bob is logged in */ if ($user = 'bob') { ?>
Stuff to do and write
<?php /*end if user is bob*/ } ?>
I kind of like the design, the html is really easy to edit but I find that I have a lot of php tags riddles throughout my templates. Is this bad design? I mean readability is fine for me, in fact it’s better, but I’m worried about whether I’m making too large of a sacrifice with the website’s performance if I add all of these little tags.
Anyone know?
No, this is not a big performance issue. Many compiled templates simply replace template tags with PHP open and close tags (eg. Smarty).
see @h2ooooooooooooooo link
https://softwareengineering.stackexchange.com/questions/80084/is-premature-optimization-really-the-root-of-all-evil