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

Render large documents with RichTextBox without UI freezing

2 Answers 91 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Malcolm
Top achievements
Rank 1
Malcolm asked on 29 Oct 2012, 10:33 AM
Hi all

I am working for a client on a project rendering large documents using the RichTextBox control. Some of the documents are quite large, and as such the UI freezes up completely when the document is rendering. I have tried doing all the document parsing on a separate worker thread and used Dispatcher to pump the the UI updates back into the UI message queue, but there doesn't seem to be any way around the UI becoming unresponsive during the actual render.

Is there any known way around this?

Is there any best practice for rendering large documents keeping the UI interactive ?

Many thanks

2 Answers, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 30 Oct 2012, 10:09 AM
Hello Malcolm,

RadRichTextBox is designed and tested to handle relatively large documents, for example up to 500 pages rich-text content. However even though all UI is virtualized there are certain document elements that may affect the overall performance. For example if the document contains a lot of tables, annotations, read-only ranges, floating objects, single large paragraphs or even large number of hyperlinks can decrease the performance. Also performance depends on how large is the view-port of the control, is it scaled and what kind of layout mode is used.

With that said we would like to know more about your scenario before we can answer your question more precisely. Can you please elaborate a bit more? And if possible it would help us a lot if you can send us a document so we can first-hand-test the performance. You can open a support ticket to do that.

Anticipating your response.

Kind regards,
Mike
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Malcolm
Top achievements
Rank 1
answered on 30 Oct 2012, 05:01 PM
Thank you Mike.

There are indeed a large number of annotations in the document. It may be that the approach used to construct the document (add annotation ranges first, and then find and populate those ranges with the actual body text) isn't the best way, although there are some business requirements that may dictate the use of these.

Many thanks for the reply,

Malcolm Swaine 

Tags
RichTextBox
Asked by
Malcolm
Top achievements
Rank 1
Answers by
Mike
Telerik team
Malcolm
Top achievements
Rank 1
Share this question
or