Re: performance improvements for 1.3
Jonathan Swartz <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
> On Mon, 27 Sep 2004, Jonathan Swartz wrote: > > >>* Replace the Buffer object with a simple scalar, and replace the >>generated $m->print() call in components with in-line concatenation >>unless autoflush is enabled. > > > I assume this still works with filters, cache_self/call_self, etc. > There's tests for all this stuff, so presumably they pass. I've made sure that all tests pass (and THANK YOU btw for starting us down the road of having a large test suite! You never realize just how helpful they are until you make wholesale changes to the core.) The only behavior change is that $m->flush_buffer no longer does anything for the sub-buffers (e.g. inside filters or scomp), I had to adjust a few tests for that. I think this behavior is actually simpler and easier to explain. > > Design-wise, this seems like a step backwards to me, but OTOH the buffer > objects don't really _do_ much, so I guess it's probably ok. > Yeah - the intention was good but as it turned out we just didn't need an abstract OO concept there. Anyway, there's no guarantee we won't have to bring it back in some form later. > >>* 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. 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