[reportlab-users] Spreadsheet Table

Tomasz Świderski contact at tomaszswiderski.com
Fri Feb 26 11:50:30 EST 2010




> If I understand your approach correctly, you want to compute the heights for the

> whole table once at the beginning.

> In the case of paragraph table cells, this means that you compute all paragraphs

> heights (which _may_ increase memory consumption significantly, but I'm not sure)

> and that each paragraph is considered twice:

> * first time for the height computation,

> * second time for the actual "rendering".

>

> So, please do also compare the performance of tables where each cell contains

> a *non-trivial* paragraph and the table has many rows.

>

> Note that using paragraphs for the cell values is a common use-case,

> even if your table contains only query results from a database.

> That's because a paragraph gives you automatic line-breaking and other features

> you often need.

>

I will compare performance with paragraphs as cell values. But I see no
reason why computing all row heights once at the beginning should lower
performance. Number of computations remain the same - it's just done in
different order. And computing everything once results in simpler,
easier to read code.

When I will have some free time, I will send performance test with
paragraphs.

Tomasz Świderski


More information about the reportlab-users mailing list