How to Speed up Bulk printing operation ?

Posted by Laghaterohan under Regular Expressions on 9/22/2010 | Points: 10 | Views : 1460 | Status : [Member] | Replies : 1

I have created a table at runtime comprising on 5 columns . I am creating 1 lakh rows and adding them to the table. After that i am writing it to xml and then displaying the same in the crystal report.

My question is that it is taking a lot of time to generate these 1 lakh rows and then writing to an xml and then displaying it in report.

Basically my requirement is that at the end of every month i need to generate the details of members and print it out on click of a button. The number can vary largely from 1000 to over lakh also..So in such case how can i speed up this bulk operation on printing?

How can i speed up this process?? Please help me out..

Thanks !

Rohan Laghate

Best Regards,
Rohan Laghate


Posted by: SheoNarayan on: 9/22/2010 [Administrator] HonoraryPlatinum | Points: 25

1 lacs record is a lot of records and this should naturally take some time, however following is the place where you might be consuming a lot of processor resources and you should concentrate on these points

1. Adding 1 lacs records, are you looping through each records and adding to the DataTable?
2. Are you again looping through the DataTable and creating the xml manually?

Here are some suggestions, not sure if this will help but you can try out

1. Instead of creating a DataTable and then creating xml file, why do not you generate the xml file directly? I do not know where is your source, is it in another datatable or dataset, if yes they have inbuilt WriteXml method that can write xml for you (read this ) .
2. Instead of using DataTable, try to use DataTableReader ( )
3. What mechanism you are using to create the xml, are you looping through and using StringBuilder, if yes try using inbuilt xml generation classes ( )

Hope this will help you

Sheo Narayan

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response