Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

HTML::Seamstress' Achilles Heel

by metaperl (Curate)
on Feb 26, 2005 at 16:22 UTC ( #434788=note: print w/ replies, xml ) Need Help??


in reply to Re^7: Survey of Surveys on HTML Templating systems
in thread Survey of Surveys on HTML Templating systems

One other thing is that Petal templates can be compiled down to a very fast form. Last year I had them running as fast as Text::Template (and with some syntax tweaks, considerably faster) but the changes were never integrated into Jean Michel's releases. Something which manipulates HTML trees at run time can't do this.
Here, you have hit the nail dead on the head. You have found the Achilles' Heel of HTML::Seamstress. I had parried and dodged and ducked, but here is where you achieve touche'. Seamstress does runtime tree manipulations with the number of tree traversals per page linear to the number of templating actions. Put in plain talk: each time you need to do some sort of templating action you need to search through the tree to do it.

I recently began work on a compiler to optimize this but quit doing it after realizing that under mod_perl, the HTML tree needs to be created afresh for each new templating operation: I found this out in my test suite. When the first test case was fine but all the rest kept failing. Then I printed out the tree and OMG! The tree is mangled! Must start afresh!

Thanks for the reference to METAL, I had not heard of that. I learned some things about Petal from this. I have noticed a number of repetitive idioms in my HTML manipulation and may one day create shortcuts and a compiler for them. It's just right now I don't want to be telepathic about what I might need.


Comment on HTML::Seamstress' Achilles Heel

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://434788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-10-23 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (128 votes), past polls