Performance problem

5 posts, 1 answers
  1. Nguyen
    Nguyen avatar
    9 posts
    Member since:
    Oct 2013

    Posted 01 Nov 2013 Link to this post

    Hello Support,
    I have to bind a large of data to GanttView (6000 Items, and 12000 links). After binding data, Memory is about 200MB. And In GUI, when  I were scrolling down form top to bottom Items, I found that the memory for the application increase so much about 1.5GB.
    When I use WPF Gantt View, it take about 230MB.
    May you help me how to increase control RAM usage?
    Thank in advanced.
    Nguyen
  2. Answer
    Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 06 Nov 2013 Link to this post

    Hello Nguyen,

    Thank you for writing.

    I was able to reproduce the issue you have described and have logged it in our Public Issue Tracking System - PITS. You can track its progress, subscribe for status change alerts and add your vote or comment on the following link - PITS Issue.

    Until the issue is resolved you can workaround it by creating a custom gantt view control with custom elements. In the custom graphical view element you should override the UpdateTextViewScroller method which will remove the increased memory consumption. Here is the code:
    public class MyGanttView : RadGanttView
    {
        protected override RadGanttViewElement CreateGanttViewElement()
        {
            return new MyGanttViewElement();
        }
     
        public override string ThemeClassName
        {
            get { return typeof(RadGanttView).FullName; }
        }
    }
     
    public class MyGanttViewElement : RadGanttViewElement
    {
        protected override GanttViewGraphicalViewElement CreateGraphicalViewElement(RadGanttViewElement ganttView)
        {
            return new MyGanttViewGraphicalViewElement(ganttView);
        }
     
        protected override Type ThemeEffectiveType
        {
            get { return typeof(RadGanttViewElement); }
        }
    }
     
    public class MyGanttViewGraphicalViewElement : GanttViewGraphicalViewElement
    {
        public MyGanttViewGraphicalViewElement(RadGanttViewElement ganttView)
            : base(ganttView) { }
     
        protected override void UpdateTextViewScroller()
        {
            RadGanttViewElement ganttElement = this.Parent as RadGanttViewElement;
            ganttElement.TextViewElement.Scroller.Scrollbar.Value = this.Scroller.Scrollbar.Value;
        }
     
        protected override Type ThemeEffectiveType
        {
            get { return typeof(GanttViewGraphicalViewElement); }
        }
    }

    I have also updated your Telerik points for bringing this issue to our attention.

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Regards,
    Ivan Petrov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nguyen
    Nguyen avatar
    9 posts
    Member since:
    Oct 2013

    Posted 12 Nov 2013 Link to this post

    Hello Ivan,
    Thank your for your help.
    It worked very well.
    Best Regards,
    Nguyen
  5. Nguyen
    Nguyen avatar
    9 posts
    Member since:
    Oct 2013

    Posted 25 Nov 2013 Link to this post

    Hello Ivan
    I got an exception when I rebind GanttView which datasource more bigger than the first at this line, It said that the value must smaller than Maximum.
           ganttElement.TextViewElement.Scroller.Scrollbar.Value = this.Scroller.Scrollbar.Value;
    I fixed by set Maximun of text element Scrollbar = maximun of Graphical element Scrollbar.
    Hope this help
    Best Regards,
    Nguyen
  6. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 28 Nov 2013 Link to this post

    Hi Nguyen,

    Thank you for writing back.

    I am glad to hear you have been able to fix the issue you have encountered. It is generally advisable that one checks the value before setting it to a scroll bar Value property. This prevents such exceptions. Since the fix for the issue was released with our 2013 Q3 SP which is now publicly available you can download it and remove the workaround from your code all together.

    Should you need further assistance, I would be glad to provide it.

    Regards,
    Ivan Petrov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready