This is a migrated thread and some comments may be shown as answers.

Importing large Docx files

1 Answer 36 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 25 Jun 2016, 03:46 PM
Importing large-ish docx files that have been exported using the DocxFormatProvider hangs on provider.Import(stream);  The same document imported directly from word works fine. Exporting the document as html then importing works fine. Only when exporting as docx, then importing again does it hang.
 
Seems to either be an issue with a high number of spans or images as I can export and import documents of far greater size as long as it is plain text without a lot of embedded links.

 

Easy to replicate:

1) Create a new document, copy the contents of the wiki page https://en.wikipedia.org/wiki/Parthian_Empire (high number of formatting changes and images)

2) Paste into document and export to docx

3) Try to import

 

The exact same document created directly in word and imported to RadRTB imports fine (2-3 seconds)

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 29 Jun 2016, 01:01 PM
Hello Doug,

I can confirm that the problem exists. I will try to explain what is causing the slow import.

The web page that you have mentioned contains multiple hyperlinks in the range of thousands. Those hyperlinks will be exported to DOCX format as hyperlink fields and the field by itself is a complex document element. Importing DOCX document with such amount of fields will force our DocxFormatProvider to update all the fields, which is rather a slow process and will lead to a slow performance on the import of such a document.

I have logged a bug report in our feedback portal. Here is the link if you would like to subscribe for status changes: Slow performance when importing documents with many hyperlink fields from RTF or Docx

Regards,
Mihail
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
RichTextBox
Asked by
Doug
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or