Re: template rendering as iteration, instead of layered concatenation

2007-06-22 Thread Malcolm Tredinnick
On Fri, 2007-06-22 at 16:54 +1000, Malcolm Tredinnick wrote: [...] > Since this really isn't the problem I want to work on right now and > since it is causing some destabilisation and changes block a bit based > on somebody with commit access being ready to react, I'll back it out so > that you c

Re: template rendering as iteration, instead of layered concatenation

2007-06-22 Thread Malcolm Tredinnick
On Fri, 2007-06-22 at 00:16 -0700, Brian Harring wrote: > On Fri, Jun 22, 2007 at 04:54:27PM +1000, Malcolm Tredinnick wrote: > > > > On Thu, 2007-06-21 at 23:29 -0700, Brian Harring wrote: > > [...] > > > While it's not performance related, one additional argument against > > > iter_render via

Re: template rendering as iteration, instead of layered concatenation

2007-06-22 Thread Brian Harring
On Fri, Jun 22, 2007 at 04:54:27PM +1000, Malcolm Tredinnick wrote: > > On Thu, 2007-06-21 at 23:29 -0700, Brian Harring wrote: > [...] > > While it's not performance related, one additional argument against > > iter_render via James Bennett is that it makes third party code > > supplying their

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Graham Dumpleton
On Jun 22, 4:29 pm, Brian Harring <[EMAIL PROTECTED]> wrote: > On Fri, Jun 22, 2007 at 03:47:05AM -, Graham Dumpleton wrote: > > > On Jun 22, 11:57 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > > wrote: > > > This problem is my high-priority item at the moment. When I've done my > > > necessary

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Malcolm Tredinnick
On Thu, 2007-06-21 at 23:29 -0700, Brian Harring wrote: [...] > While it's not performance related, one additional argument against > iter_render via James Bennett is that it makes third party code > supplying their own Node derivatives a little tricky if they're trying > to support svn and <=0

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Brian Harring
On Fri, Jun 22, 2007 at 03:47:05AM -, Graham Dumpleton wrote: > > On Jun 22, 11:57 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > This problem is my high-priority item at the moment. When I've done my > > necessary work today, I'm going to hook up a couple of different wsgi > > server

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Malcolm Tredinnick
On Fri, 2007-06-22 at 03:47 +, Graham Dumpleton wrote: > On Jun 22, 11:57 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > This problem is my high-priority item at the moment. When I've done my > > necessary work today, I'm going to hook up a couple of different wsgi > > servers (along

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Graham Dumpleton
On Jun 22, 11:57 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > This problem is my high-priority item at the moment. When I've done my > necessary work today, I'm going to hook up a couple of different wsgi > servers (along with mod_python) and make sure we fix it or back it out > for a bit.

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Brian Harring
On Fri, Jun 22, 2007 at 11:57:58AM +1000, Malcolm Tredinnick wrote: > > On Thu, 2007-06-21 at 18:29 -0700, Brian Harring wrote: > > On Fri, Jun 22, 2007 at 09:47:57AM +1000, Malcolm Tredinnick wrote: > [...] > > > Making the change at the WSGI handler level is more efficient in terms > > > of netw

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Malcolm Tredinnick
On Thu, 2007-06-21 at 18:29 -0700, Brian Harring wrote: > On Fri, Jun 22, 2007 at 09:47:57AM +1000, Malcolm Tredinnick wrote: [...] > > Making the change at the WSGI handler level is more efficient in terms > > of network traffic, since WSGI servers are not permitted to buffer > > iterated writes.

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Brian Harring
On Fri, Jun 22, 2007 at 09:47:57AM +1000, Malcolm Tredinnick wrote: > > On Thu, 2007-06-21 at 10:16 -0700, Brian Harring wrote: > > On Thu, Jun 21, 2007 at 08:33:05PM +1000, Malcolm Tredinnick wrote: > > > > > > Brian, > > > > > > On Thu, 2007-06-14 at 12:23 -0700, Brian Harring wrote: > > > > J

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Malcolm Tredinnick
On Thu, 2007-06-21 at 10:16 -0700, Brian Harring wrote: > On Thu, Jun 21, 2007 at 08:33:05PM +1000, Malcolm Tredinnick wrote: > > > > Brian, > > > > On Thu, 2007-06-14 at 12:23 -0700, Brian Harring wrote: > > > Just filed ticket 4565, which basically converts template rendering > > > away from

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Brian Harring
On Thu, Jun 21, 2007 at 08:33:05PM +1000, Malcolm Tredinnick wrote: > > Brian, > > On Thu, 2007-06-14 at 12:23 -0700, Brian Harring wrote: > > Just filed ticket 4565, which basically converts template rendering > > away from "build a string within this node of subnode results, return > > it, wa

Re: template rendering as iteration, instead of layered concatenation

2007-06-21 Thread Malcolm Tredinnick
Brian, On Thu, 2007-06-14 at 12:23 -0700, Brian Harring wrote: > Just filed ticket 4565, which basically converts template rendering > away from "build a string within this node of subnode results, return > it, wash rinse repeat", and into "yield each subnode chunk, and my > data as it's avail

Re: template rendering as iteration, instead of layered concatenation

2007-06-17 Thread Malcolm Tredinnick
On Thu, 2007-06-14 at 12:23 -0700, Brian Harring wrote: > Just filed ticket 4565, which basically converts template rendering > away from "build a string within this node of subnode results, return > it, wash rinse repeat", and into "yield each subnode chunk, and my > data as it's available". >

Re: template rendering as iteration, instead of layered concatenation

2007-06-15 Thread Jacob Kaplan-Moss
On 6/15/07, Brian Harring <[EMAIL PROTECTED]> wrote: > On Thu, Jun 14, 2007 at 06:16:22PM -0500, Jacob Kaplan-Moss wrote: > > Any reason not to spell ``iter_render`` as ``__iter__``? > > __iter__ is used by iter, takes no args; iter_render (and render) > however, take a single arg- context. Yeah,

Re: template rendering as iteration, instead of layered concatenation

2007-06-15 Thread Brian Harring
On Thu, Jun 14, 2007 at 06:16:22PM -0500, Jacob Kaplan-Moss wrote: > > On 6/14/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Whoops. :-( > > Yeah, I got stuck on that, too :) > > > To completely bulletproof this, you could add a metaclass to Node to > > check that the Node subclass that

Re: template rendering as iteration, instead of layered concatenation

2007-06-14 Thread Jacob Kaplan-Moss
On 6/14/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Whoops. :-( Yeah, I got stuck on that, too :) > To completely bulletproof this, you could add a metaclass to Node to > check that the Node subclass that is being created has a method called > either "render" or "iter_render" (or both).

Re: template rendering as iteration, instead of layered concatenation

2007-06-14 Thread Malcolm Tredinnick
On Thu, 2007-06-14 at 12:23 -0700, Brian Harring wrote: > Just filed ticket 4565, which basically converts template rendering > away from "build a string within this node of subnode results, return > it, wash rinse repeat", and into "yield each subnode chunk, and my > data as it's available". >

template rendering as iteration, instead of layered concatenation

2007-06-14 Thread Brian Harring
Just filed ticket 4565, which basically converts template rendering away from "build a string within this node of subnode results, return it, wash rinse repeat", and into "yield each subnode chunk, and my data as it's available". The pros of it are following (copy/pasting from the ticket): * i