[Zope-dev] <dtml-in> batching badly

seb bacon seb@jamkit.com
Tue, 19 Jun 2001 10:40:42 +0100


* Joachim Werner <joe@iuveno-net.de> [010618 20:28]:
> > That's not the behaviour I'd expect.  Can anyone confirm this is a
> > bug?
> 
> As LEE Kwan Soo has already said, it is not a bug, but a clever (too
> clever?) feature that should maybe not be enabled by default. Every second
> week or so somebody runs into this and thinks it is a bug.

Thanks for the hint, folks.

I'm not a zope newbie, and this still bit me.  IMO there's something
fairly wrong with the current setup.  either the default behaviour
should be changed to orphans=0, or the visibility of default values
for tags should be improved (from the book: "orphan=int The desired
minimum batch size" - no mention of defaults).

Furthermore, the 'feature' doesn't work as I'd expect.  In the example
I posted, for the sequence (1,2,3,4), I got: 

 batch 1: 1
 batch 2: 2 3 4
 batch 3: 3 4
 batch 4: 4

This isn't in batches of at least 3... If it were iterating in minimum
batches of 3, shouldn't that be: 

 batch 1: 1 2 3
 batch 2: 2 3 4
 batch 3: 2 3 4
 batch 4: 2 3 4

It's ugly!

seb