Gantt series performance

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Jeremy Johnson
Newbie
Newbie
Posts: 16
Joined: Wed Feb 27, 2013 12:00 am

Gantt series performance

Post by Jeremy Johnson » Thu Mar 21, 2013 6:26 pm

I have a Gantt series that will ultimately need to display thousands of bars. With only ~600 bars, drawing is taking upwards of 15 seconds.

I just need the Gantt to display simple, plain boxes such as those in the attached image. However, when my entire data set is loaded there will be many thousand of them.

Any suggestions to improve drawing performance? (I'm aware I could do some sort of down sampling, which I will do, but I need better chart performance at least with hundreds of boxes).\

Thanks.

graph detail.png
graph detail.png (5.08 KiB) Viewed 10971 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Gantt series performance

Post by Sandra » Fri Mar 22, 2013 1:12 pm

Hello Jeremy Johnson,

Would be very grateful if you could send us a simple project because we can reproduce exactly your problem here?

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jeremy Johnson
Newbie
Newbie
Posts: 16
Joined: Wed Feb 27, 2013 12:00 am

Re: Gantt series performance

Post by Jeremy Johnson » Fri Mar 22, 2013 10:13 pm

Code is ready to go. Where shall I send it? Thanks!

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Gantt series performance

Post by Narcís » Mon Mar 25, 2013 7:59 am

Hi Jeremy,

You can either attach it to a forums post or send it to http://www.steema.net/upload/

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jeremy Johnson
Newbie
Newbie
Posts: 16
Joined: Wed Feb 27, 2013 12:00 am

Re: Gantt series performance

Post by Jeremy Johnson » Mon Mar 25, 2013 9:42 pm

Thanks, the sample code has been uploaded. (Poor Gantt Performance Test.zip)

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Gantt series performance

Post by Sandra » Tue Mar 26, 2013 4:06 pm

Hello Jeremy Johnson,

Ok I have achieved improve your performance disabling the PenConnection of Gantt Series. I recommend you, add it after adding values in the gantt as I do in your code:

Code: Select all

            // Add many bars to the Gantt series
            //this kills performance.  i need to support large data sets, and even with down sampling I really would like to get decent performance with thousands of bars.
            //
            for (int i = 0; i < 500; i++)
            {
                _activitySeries.Add(startTime.AddSeconds(i * 10), 2,  Colors.Red);
            }

            _activitySeries.Add(startTime.AddSeconds(iOffPanelStart * secBetweenTicks), startTime.AddSeconds(iAbsentStart * secBetweenTicks), 1, _color2);
            _activitySeries.Add(startTime.AddSeconds(iAbsentStart * secBetweenTicks), startTime.AddSeconds(iAbsentEnd * secBetweenTicks), 0, _color3);

            _activitySeries.ConnectingPen.Visible = false;
Could you tell us if it works in your end?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jeremy Johnson
Newbie
Newbie
Posts: 16
Joined: Wed Feb 27, 2013 12:00 am

Re: Gantt series performance

Post by Jeremy Johnson » Wed Apr 03, 2013 3:49 pm

Thanks! This has improved execution time tremendously.

However, the memory usage by the Gantt series is huge. With more than around 12000 items, I get an out-of-memory exception. Memory usage in my sample app is around 850MB with 10000 items.

Is there anything that can be done to reduce memory usage?

Thanks,
Jeremy

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Gantt series performance

Post by Sandra » Fri Apr 05, 2013 11:07 am

Hello Jeremy,

Ok, I have made a simple modification that consist in add start and end coordinates and color, therefore, use correctly method add of Gantt series. Please see in the attached project the modification code and check if performance is improved and out-of-memory exception disappears in your machine. If you have any problems please let me know.
Poor Gantt Performance Test.zip
(34.51 KiB) Downloaded 522 times
Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jeremy Johnson
Newbie
Newbie
Posts: 16
Joined: Wed Feb 27, 2013 12:00 am

Re: Gantt series performance

Post by Jeremy Johnson » Fri Apr 05, 2013 3:21 pm

Thanks, Sandra! You've saved the day.

Memory usage is now a slim 50MB for 10,000 items.

Post Reply