[reportlab-users] Large tables are very slow to produce
Mark Matthews
mem at object-craft.com.au
Thu Nov 8 20:35:52 EST 2007
On 09/11/2007, at 12:27 PM, Andy Robinson wrote:
> Try making 5000 1-row tables and see how much faster it gets. That
> will tell us if it's a problem with recursively sizing the whole
> things, and under the hood it's just as good a solution.
>
> Or, if your data breaks into more sensible sized bands with some kind
> of group sub-totals, make each band a table of its own. If a table
> usually fits on one page, you'll get good performance. This also
> makes formatting easier too as you don't need to do clever
> computations on which rows to apply different styles to.
>
> The problem is that we may be trying to auto-size the whole thing
> (longTable is supposed to fix this), or perhaps eating a lot of
> memory. If you are explicitly setting the column widths yourself,
> which makes for tidier documents and makes things faster anyway,
> there's no reason to have one huge table.
>
> Hope this helps,
Thanks for the immediate response;
As an aside (I had read this: http://two.pairlist.net/pipermail/reportlab-users/2004-May/003027.html
and wondered if this was recommended)
1) a 1000 line table, with repeating rows takes: ~1m5s
2) If I split this into 100 10 line table it takes 8s
-------------------------------------------------
Mark Matthews
General Manager
Object Craft Pty Ltd
Phone: +61 3 9654 9099
http://www.object-craft.com.au
More information about the reportlab-users
mailing list