As mentioned in previous post we were excited by the introduction of the new TOC generation feature in Apose and were looking forward to putting it to good use. However we have run in to some serious performance issues that presently will result in dumping what otherwise would be a great feature.
The attached large document report 'Testin.docx' was generated and saved to disc as part of our report generating process within 20 seconds using the latest Words Aspose 9.0.
The performance problems start however once we add code to generate the TOC. For example running the following simple code on the attached document produces the following results:
Document doc = new Document(@"TestIn.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
Debug.Write(DateTime.Now + " START UPDATE FIELDS\n");
Debug.Write(DateTime.Now + " START UPDATE PAGE LAYOUT\n");
Debug.Write(DateTime.Now + " START SAVE\n");
13/05/2010 18:10:19 START UPDATE FIELDS
13/05/2010 18:11:01 START UPDATE PAGE LAYOUT
13/05/2010 18:11:31 START SAVE
It takes 42 seconds to update the fields and then another 30 seconds to update the page layout. This results in adding 72 seconds to report generation just for the sake of adding a TOC. Remember original report only takes 20 to build and save.
(Note: For Comparison it does takes Microsoft Word approx 25 seconds to update the TOC in this document.)
Therefore can Aspose advise on any of the following:
1) Is there anyway of speeding up the TOC generation process?
2) I tried calling UpdateFields on the Paragraph.Range that contained the TOC but this did not seem to work and the TOC was not updated?
3) What is going on whithin Update Fields/Update Page Layout that takes so long? Is there anyway I could change my document styles TOC definition that would speed up this process?
4) Are aspose aware of this problem? Are there any plans in progress to improve the performance of this feature?
Thanks and Regards
Senior Software Engineer - HP Software