On Sat, Feb 09, 2002 at 02:02:07AM +1100, Bradley Baetz wrote: > What are the chances that the template toolkit could inline PROCESSed (and > INCLUDEd) blocks for us?
None, not really. INCLUDE requires variable localisation which is more expensive than the subroutine call anyway. You could, in theory, do it with PROCESS templates but I wouldn't like to do automatically in all cases for fear of blowing up the size of the templates (in some cases inlining produces slower code than sub calls because the increased size causes more memory paging). I think you're worrying about it unecessarily. The benchmarks will always show what looks like a big slowdown, but that's really just because you're comparing a finite value (time to make sub call) with a inifinitesimal value (time to make no sub call). Performance is of course an issue, but I don't think this is a major bottleneck that we can or need to do much about. > That also doesn't explain with 2.06 is faster than 2.06d, although Myk's > email about the html filter could explain that. Yep, that's a genuine slowdown which does indeed look like it's caused by the newly dynamic HTML filter. That's something that's relatively easy to fix, although I should point out that you'll only see the slowdown if you're using the HTML filter (which is why my benchmarks showed 2.06d as being faster than 2.06c - I wasn't using the html filter). HTH A
