Hi,

We are using iText1.02b to create PDF documents in our application. But we
are having a strange discrepancy in performance between my dev environment
and the production environment.

The development environment is Windows XP (dev using Websphere) and the
production environment is an ISeries box. When I create a PDF with 31 pages
it completes in about 12 -13 seconds and the same document takes over 60
seconds to build on the ISeries.

My method algorithm is as follows:

1.   Instantiate the cummulativeOutputStream
2.   Instantiate a tempOutputStream (for Stamper)
3.   Create reader for PDF form (Header Page)
4.   Create Stamper for reader
5.   fillFormFields
6.   Stamper.setFormFlattening(true);
7.   Close stamper
7.   Move tempOutputStream data to cummulativeOutputStream
8.   While (subsequent pages are required) {
9.    Create reader for PDF form (Subsequent Page)
10.   Create Stamper for reader
11.   While (more records on page and more records in object) {
12.           fillFormFields for next record
13.   }
14.   Stamper.setFormFlattening(true);
15.   Close stamper
16.   Move tempOutputStream data to cummulativeOutputStream
17.   }
16. return the cummulativeOutputStream (final PDF document)

All the data required to fill the form is held in an object in memory (no
database access happens during this procedure)

The following is an excerpt from the application log on the ISeries:

2004-10-19 08:45:35.267 INFO  [Servlet.Engine.Transports : 0]
FormGeneratorBean          : Building PDF document.
2004-10-19 08:45:35.496 DEBUG [Servlet.Engine.Transports : 0]
FormGeneratorBean          : Filling header details.
2004-10-19 08:45:36.005 DEBUG [Servlet.Engine.Transports : 0]
FormGeneratorBean          : Filling record 1 details.
2004-10-19 08:45:38.505 DEBUG [Servlet.Engine.Transports : 0]
FormGeneratorBean          : Filling record 2 details.

and so on ...

2004-10-19 08:46:42.908 DEBUG [Servlet.Engine.Transports : 0]
FormGeneratorBean          : Filling record 89 details.
2004-10-19 08:46:43.129 DEBUG [Servlet.Engine.Transports : 0]
FormGeneratorBean          : Filling record 90 details.
2004-10-19 08:46:43.348 DEBUG [Servlet.Engine.Transports : 0]
FormGeneratorBean          : Filling record 91 details.


I generated the same on my dev environment and the application log is as
follows:

2004-10-19 16:50:25,044  INFO [Servlet.Engine.Transports : 2]
(FormGeneratorBean.java:390) - Building PDF document.
2004-10-19 16:50:25,244 DEBUG [Servlet.Engine.Transports : 2]
(FormGeneratorBean.java:626) - Filling header details.
2004-10-19 16:50:26,574 DEBUG [Servlet.Engine.Transports : 2]
(FormGeneratorBean.java:805) - Filling record 1 details.
2004-10-19 16:50:26,734 DEBUG [Servlet.Engine.Transports : 2]
(FormGeneratorBean.java:805) - Filling record 2 details.

and so on...

2004-10-19 16:50:37,256 DEBUG [Servlet.Engine.Transports : 2]
(FormGeneratorBean.java:805) - Filling record 89 details.
2004-10-19 16:50:37,386 DEBUG [Servlet.Engine.Transports : 2]
(FormGeneratorBean.java:805) - Filling record 90 details.
2004-10-19 16:50:37,416 DEBUG [Servlet.Engine.Transports : 2]
(FormGeneratorBean.java:805) - Filling record 91 details.

Notice how the task on my dev machine started at 16:50:25,044 and finished
at 16:50:37,416. in about 13 sec. While on the ISeries it took from
08:45:35.267 to 08:46:43.348 which is about 69 sec. My dev machine has
about 1 Gig of memory while the ISeries has 3 Gigs.

The final document has 31 pages in both cases. The page size does not
matter. It always takes longer to build the document on the ISeries. This
is just an example here.

Any suggestions?
                                                                           
 Regards,                                                                  
                                                                           
 Supriya Bhargavan                                                         
 [EMAIL PROTECTED]                                                        
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to