Re: performance improvements for 1.3
Jonathan Swartz <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
>>> * Can no longer print a list inside <% %>, e.g. <% @foo %>, because
>>> these tags are now translated into simple in-line concatenations. This
>>> is no great loss since you can just use a join. If people think it is
>>> warranted, we can continue to support this syntax (and disable the
>>> optimization) for a limited time via a special compiler flag.
>>
>> I don't know that we ever documented this one way or another, but this
>> has
>> always worked in the past. I think people might complain a bit. I
>> personally have never done this.
>
> It has not always worked - it used to just evaluate the list in scalar
> context (as it will now once again). I remember us fixing it on request,
> but I can't find it in the Changes list or in the mailing list. If
> people complain we can add a backwards compatibility parameter that
> makes it do what it did before.
Actually looks like we fixed this in 0.896. So that is pretty old.
The only way I can figure how not to break it is to replace
$$_outbuf .= <expr>
with
for (<expr>) { $$_outbuf .= $_ }
every time we translate a <% %> tag. This would still be faster than
calling $m->print, but not as much of an improvement. And so much less
concise...
Jon
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php