Hi,

I am facing a problem of high CPU usage while document.add() for large data
CPU usage became high and after that it became static and it did not come
down
which ultimately crashes the web application.We are using Websphere version5
as app server.
Around 8000 bean objects, it's populating datatable and adding it to
document fine but not happening for 20000 or more.
Also I tried out to populate the data and add it in chunks (like 1000 at a
time) but which did not help much.
Is there any limitation for the volume of data? Or, there should be some
other way of implementation?
I have provided a scale down portion of code below -
try{
ByteArrayOutputStream baosPDF = new ByteArrayOutputStream();
Document document = new Document(PageSize.A4.rotate());
PdfWriter docWriter = PdfWriter.getInstance(document,baosPDF);
Table datatable = new Table(2,4);
List displayList = GetBeanList();//To populate the bean list
document.Open();
for(int i=0;i<displayD1List.size();i++){
 //population of datatable from the bean list
}
document.add(datatable);
}
catch(DocumentException ex){
}
finally
{
document.Close();
docWriter.close();
}

Regards,
Aparupa
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to