[reportlab-users] Performance problem for lineplots with many values (with possible solution)
sebastianmessing at gmx.de
Thu Jan 31 05:14:23 EST 2013
On 30.01.2013 12:19, Robin Becker wrote:
> I looked at your proposed improvement and thought this must be obviously
> a O(n)running time versus O(n**2) algorithm problem. However,
> when I run the following code
> so the existing algorithm appears to win. Can you try this script on
> your machine? What python are you using etc etc?
I tried your script on my machine and I have the same results as you. I
am using Python 2.6.6. I also changed it back to your code. And now the
script also runs fast.
> Perhaps there's some other reason why your script has a long running time.
Yes, I also think that now.
I had 4 of these scripts running for test reports and they were running
very long. When I cancelled them with Ctrl-C all of them were cancelled
in this line of code. And I thought that they must spend a lot of time
In http://wiki.python.org/moin/PythonSpeed/PerformanceTips#Loops they
say that using map or list comprehension should be faster. So I changed
the code and then it was running fast. And I thought that this was the
There must have been another reason. But now I can not get the program
to run for a long time again. I don't know why it was running for a long
If I tested more before writing the mail, you could have saved your
time. I am sorry for that.
OsTech GmbH i.G.
Boxhagener Str. 76/78
More information about the reportlab-users