[reportlab-users] Report generation time is not optimized - ideas?

J. R. Carroll jrc.csus at gmail.com
Wed Jan 2 14:40:44 EST 2013


Throwing this out there, hoping to catch an idea or two:

The Setting: our company has an open embedded device that we have
installed reportlab to. On our local machines, it takes the report less
than a second to generate the PDF and save to disk - very quick - very nice
(thank you!). On the target device it's taking anywhere from 6.5sec to
15.sec - not the best case scenario I can think of.

*Question 1*: When we built on our local PC's, we used a standard debian
repo to pull down reportlab... THEN on top of that we installed
reportlab-accel (this information was passed down to me from my
mentor/boss). When we installed on the target device, we built it from
source (via reportlab.com). Our OE engineer for the device believes that
the source file already contains reportlab-accelerator as he can see the
files in the build directory. He is comparing from a list SIMILAR to this:
http://packages.ubuntu.com/hardy/amd64/python-reportlab-accel/filelist, and
seeing that the reportlab-accelerator files are already included in the
source when installed from
http://www.reportlab.com/software/opensource/rl-toolkit/download/
(reportlab-2.6.tar.gz). Is he correct in thinking there is no other
package he can install to improve PDF generation times?

*Question 2*: Is there anything we can purchase from reportlab that will
make this faster (aka ReportLab Plus)?

To answer some of your (potential) questions and comments: We are drawing
thousands of tiny-tiny-tiny lines to generate waveforms, this is why it
takes so long. I will be profiling the code in the next few days as well,
looking at what I have written to see where I can make improvements, but I
wanted to see if there was any room for optimization on the reportlab side
(for what we've installed or could install) before I hammer away at my
stuff (which will certainly result in better performance once I identify
all my garbage code).

As an example of how we are drawing these many lines:

wave = shapes.Drawing()

> wave.add(shapes.PolyLine(wave_list, strokeWidth=.6))



Where wave_list represents the coordinates of the polyline we wish to draw.
I'm assuming from what I have reviewed thus far there is no other
optimization I can do here... right?


Thank you,



----


J. R. Carroll
Cell: (650) 776-6613
www.jrcresearch.net
www.ontvp.com
Email: jrcarroll at jrcresearch.net
jrcarroll at hurtzlab.com
jrc.csus at gmail.com
<https://www.facebook.com/J.R.Car>
<https://twitter.com/jNammer><http://www.linkedin.com/in/jrcarroll>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20130102/b39e5414/attachment.htm>


More information about the reportlab-users mailing list