[reportlab-users] Memory consumption of a "simple" document seems excessive

Robin Becker reportlab-users@reportlab.com
Thu, 8 Jan 2004 10:57:03 +0000


In article <OF9ACA0788.FA429149-ONC1256E15.0035A56A@ubitrade.com>,
amaury.forgeotdarc@ubitrade.com writes
>Hello,
>
>I followed your discussion and I think I can add my $.02 comment:
>
>It seems that loop detection is already present in the doctemplate.py file:
>(lines ~544 in my version)
>
>When a flowable causes a page break, its "_postponed" member is set to 1.
>Next time, if the "_postponed" is still here, we detected an empty page !
>All the code is present, (even the flowable's identity)
>but unfortunately (?) the raise statement is commented out...

..... yes at some point in the past we broke our own code. Even if the
old mechanism were in place I think there is still an issue about
splitting as _postponed is a hack that's set by doctemplate and nobody
requires the split to preserve it.

>If one wants to implement the 3 page breaks limit, it's easy to increment
>the "_postponed"
>each time and fail only when it raises the limit.
>
>> Any fixed number of blank pages will break somebody's document.
>
>But counting the number of "postpones" instead is correct.
>
>It is even possible, in case a flowable is too large , to replace it by a
>warning paragraph,
>and continue the process.
>
>--
>Amaury Forgeot d'Arc
>
>_______________________________________________
>reportlab-users mailing list
>reportlab-users@reportlab.com
>http://two.pairlist.net/mailman/listinfo/reportlab-users
>

-- 
Robin Becker