Render large documents with RichTextBox without UI freezing

3 posts, 0 answers
  1. Malcolm
    Malcolm avatar
    6 posts
    Member since:
    Sep 2010

    Posted 29 Oct 2012 Link to this post

    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. Mike
    Mike avatar
    640 posts

    Posted 30 Oct 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Malcolm
    Malcolm avatar
    6 posts
    Member since:
    Sep 2010

    Posted 30 Oct 2012 Link to this post

    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 

Back to Top