RadRichTextBox memory usage

9 posts, 1 answers
  1. Gonzalo
    Gonzalo avatar
    2 posts
    Member since:
    Oct 2014

    Posted 05 Nov 2014 Link to this post

    Hi everyone, i'm displaying a simple window with a RadRichTextBox and a RadRichTextBoxRibbonUI as a modal dialog. I noticed that each time the modal is shown there's a significant spike in the application's memory usage, memory that never seems to be freed even after the dialog is closed. Eventually if the user opens the dialog enough time he/she receives an OutOfMemoryException.

    Any ideas on what can be going on? I'm using version 2013 Q3

    Thanks, Gonzalo
  2. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 06 Nov 2014 Link to this post

    Hi Gonzalo,

    In the Q1 2014 version of RadRichTextBox we released a fix related to a memory leak when TableStylesGallery is present in the ribbon. Are you using the gallery? Please try removing it if you are and see if the problem persists.

    If this is not the issue you are observing, please try to provide a simple sample project demonstrating the issue and we will look into it.

    Regards,
    Petya
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Gonzalo
    Gonzalo avatar
    2 posts
    Member since:
    Oct 2014

    Posted 06 Nov 2014 in reply to Petya Link to this post

    Thank you Petya, removing the gallery does make it much better.

    Gonzalo
  5. Salman Anwar
    Salman Anwar avatar
    3 posts
    Member since:
    Jun 2010

    Posted 02 Sep 2015 Link to this post

    I am using 2013 Q3 and memory consumption is spiking as I type in the control and never releases. I do not have the Table Styles in the ribbon. Memory consumption jumps several hundred megabytes for a simple paragraph.
  6. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 07 Sep 2015 Link to this post

    Hello Salman,

    You could check the Performance article in our documentation that lists some of the known factors which may cause performance issues and provides tips about how to circumnavigate them. 

    Since Q3 2013 we introduced some performance optimizations, many bug fixes and new features. Therefore, I encourage you to update the version of the controls you are using.

    If this is not useful for you, would be great if you could provide us a sample project to further investigate the case and try to suggest you a suitable solution. 

    Regards,
    Tanya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Salman Anwar
    Salman Anwar avatar
    3 posts
    Member since:
    Jun 2010

    Posted 07 Sep 2015 in reply to Tanya Link to this post

    Unfortunately, we are unable to move to a more recent version of the controls due to a dependency on a library we are consuming that is based on the MaskedTextEdit control which is deprecated in 2013, but removed in 2014. 

    However, I can reproduce the problem using the Telerik sample for Rich Edit Textbox including using the most recent version. For quick repro: Open the sample and create a header with a table, a footer with a table and then with enough content to allow you to scroll. Scroll up and down and you will see the usage climb very quickly. Additionally, typing will cause memory usage to climb and start to bog down the machine.

  8. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 10 Sep 2015 Link to this post

    Hello Salman,

    Have you profiled your application? The Windows' Task Manager is not an efficient tool and could be misleading. The memory leaks could be reproduced in specific scenarios and if you think there is a memory leak in your application you could try to isolate it in a sample project with your setup and send it to us. Once we figure out a problem, we will do our best to give you a suitable advice.

    Regards,
    Tanya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. Salman Anwar
    Salman Anwar avatar
    3 posts
    Member since:
    Jun 2010

    Posted 10 Sep 2015 in reply to Tanya Link to this post

    The sample project I am using is TelerikEditorDemo_WPF from the RichTextBox_WPF solution. It is unmodified. Running with code analysis on, the following feedback was provided:

    Warning5DA0022: # Gen 1 Collections / # Gen 2 Collections = 4.26; There is a relatively high rate of Gen 2 garbage collections occurring. If, by design, most of your program's data structures are allocated and persisted for a long time, this is not ordinarily a problem. However, if this behavior is unintended, your app may be pinning objects. If you are not certain, you can gather .NET memory allocation data and object lifetime information to understand the pattern of memory allocation your application uses. TelerikEditorDemo150910.vsp00

    Message6DA0501: (Average)% Processor Time = 27.66; Average CPU consumption by the Process being profiled. TelerikEditorDemo150910.vsp00

    Message7DA0502: (Maximum)% Processor Time = 124.00; This rule is for information only. The Process()\% Processor Time counter measures CPU consumption of the process you are profiling. The value reported is the maximum observed over all measurement intervals. TelerikEditorDemo150910.vsp00

    Message8DA0503: (Average)Working Set = 373,872,819.80; This information was gathered for information only. The Process Working Set counter measures physical memory usage by the process you are profiling. The value reported is the average computed over all measurement intervals. TelerikEditorDemo150910.vsp00

    Message9DA0504: (Maximum)Working Set = 456,372,224.00; This rule is for information only. The Process Working Set counter measures physical memory usage by the process you are profiling. The value reported is the maximum observed over all measurement intervals. TelerikEditorDemo150910.vsp00

    Message10DA0505: (Average)Private Bytes = 379,319,280.65; This information was gathered for information only. The Process Private Bytes counter measures virtual memory allocated by the process you are profiling that cannot be shared with other processes. The value reported is the average computed over all measurement intervals. TelerikEditorDemo150910.vsp00

    Message11DA0506: (Maximum)Private Bytes = 468,545,536.00; This rule is for information only. The Process Private Bytes counter measures virtual memory allocated by the process you are profiling that cannot be shared with other processes. The value reported is the maximum observed over all measurement intervals. TelerikEditorDemo150910.vsp00

  10. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 15 Sep 2015 Link to this post

    Hi Salman,

    Thank you for the provided information.

    The report has a warning and three informational messages and we couldn't find anything suspicious which could lead to a memory leak. RadRichTextBox is a complex control coming with many features, which demand some resources and the results from this report we consider as normal. The values for the processor time are in normal ranges and the memory consumption we consider as expected. 

    Regards,
    Tanya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready