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

Robin Becker reportlab-users@reportlab.com
Fri, 9 Jan 2004 08:47:35 +0000


In article <PGECLPOBGNBNKHNAGIJHCEMMIDAA.andy@reportlab.com>, Andy
Robinson <andy@reportlab.com> writes
......
>I just updated my doctemplate fix to allow ten empty pages,
>because I was working on an app which deliberately generates
>up to 3 empty pages (to ensure output for print is in
>multiples of 4).
>
>I think the original _postponed is better than my fix and
>should go back in, but I haven't done this yet.

This was the intended approach back when I wrote it, I guess I should do
some detective work on why/how it came to be removed.

>
>I also think we should have an rl_config variable and a 
>DocTemplate attribute for "what to do with layout errors".
>Options could be:
>1. raise LayoutError and stop, with lots of info on the identity
>of the portponed flowable (this is the default)
>2. make a PDF up to that point and stop
>3. make a PDF with a warning paragraph at that point
>
>I think we also need to add in some support for tracing.
>At present every flowable has a method identity(...) which
>should return a string useful in identifying it.  e.g.
>for a paragraph, you can the first few words of the text.
>

There are difficulties. At one point I thought it would be sufficient to
use introspection to determine where the flowable was generated (which
could be done using stack frames etc at flowable instantiation), but
most flowables are generated by some more or less anonymous process eg
database lookup and similar so some part of the identity should be based
on the contents.

>Any thoughts on this?
>
>Thanks,
>
>Andy
.....
-- 
Robin Becker