[reportlab-users] re: PDF Generation performance

Larry Bates reportlab-users@reportlab.com
Wed, 24 Dec 2003 17:20:48 -0600


Wow that's a long time.  I have an application that generates
fairly complex 8 page documents (one for every school system
in the state).  The pages contain a mixture of paragraphs,
tables, multi-bar bargraphs, background .JPG images, etc.
The data comes from MS Access database via ODBC.  Background
form is put on the canvas using PageCatcher from external
.PDF file that was generated in Quark.  Example of last
years (still working on this years) Alabama Department 
of Education Report Cards can be located at 

I can generate a complete 8 page report in 1 second or about
480 pages per minute on my 3.06Ghz Pentium 4 workstation.
This time includes having ConfigParser read and parse 
a 1500 line .INI file that contains specifications for each
object that is to be printed on the pages, the SQL query 
that joins two tables to get all the data for a school, 
time for PageCatcher to read background form, ReportLab 
to generate all the objects, compression, and saving of 
the output .PDF file to my local drive.  Frankly I'm 
impressed with the performance.

Hope the information helps.

Larry Bates

Message: 1
Date: Wed, 24 Dec 2003 13:31:50 +0200
From: Shayan Raghavjee <shayanr@sjsoft.com>
To: reportlab-users@reportlab.com
Subject: [reportlab-users] PDF Generation performance
Reply-To: reportlab-users@reportlab.com

Hi guys,

I'm having a major performance issue, and it's nothing that a pill off 
the internet could solve, I was hoping you could give me some input. 
I've been using Reportlab for a few months, but never really needed any 
huge reports. Some reports have taken ages to build, but that was more 
due to the SQL statement complexity than anything else.

I'm currently working on something that doesn't require too much heavy 
SQL stuff, but does generate PDFs with sometimes well over a hundred 
pages. I've noticed Reportlab takes an age to build the file, a 100 page 
document typically took 15 minutes, which is far outside the required 
speed. I'm not entirely sure where the problem lies. The form is 
basically a table with some required information on top, and another at 
the bottom, which is a table of tables. Maybe it's too complex?

How long should it take for 100 pages? Is there any way to make it 
faster, using templates or something, because most of the info is 

Any help, or ideas would be welcomed with open arms.

Shayan Raghavjee
St. James Software