[reportlab-users] Performance problem for lineplots with many values (with possible solution)
Sebastian Messing
sebastianmessing at gmx.de
Wed Jan 30 05:17:10 EST 2013
Hi!
I tried to generate a lineplot with joinedLines=1. The lineplot has
three lines, each line with 86000 values. The generation of the lineplot
is very, very slow (hours).
I use ReportLab 2.6 but I also found the problem in ReportLab daily from
01/29/2013 in /src/reportlab/graphics/charts/lineplots.py:
276 # Iterate over data columns.
277 if self.joinedLines:
278 points = []
279 for xy in row:
280 points += [xy[0], xy[1]]
If I use a list comprehension instead, the plot is generated within
seconds or minutes:
278 points = [[xy[0], xy[1]] for xy in row]
279
280
Also linecharts.py contains the same performance problem but I don't use
that.
Best regards
Sebastian Messing
--
OsTech GmbH i.G.
Boxhagener Str. 76/78
10245 Berlin
Tel.: 030/2977304-23
Fax: 030/2977304-11
More information about the reportlab-users
mailing list