RadiantQ WPF Gantt
What are the different ways to improve the performance of the gantt with a large set of tasks?
| ![]() ![]() |
What are the different ways to improve the performance of the gantt with a large set of tasks?
a) GanttControl.WorkTimeSchedule property
Note that by default the GanttControl uses a "5 days a week, 8 hours a day" work-time schedule to calculate the duration of a task. But, it's possible that in your gantt application, you don't care for specific working-times. You might simply want to follow a 24 X 7 schedule where a task with 24 hour effort would have a duration of 1 day (in a 8 X 5 schedule the duration would be 3 days or more if it spans across weekends).
To set a 24 X 7 schedule which in turn would improve load time performance, do this:
this.ganttControl.WorkTimeSchedule = null;
b) Disable Time Validations while building the Model
The gantt model does a lot of validations when the activity's times are set. But, validating the times might be unnecessary, if you know for a fact that the persisted times are proper (the start and end times don't fall under non-working times, etc.). To turn off validation for such scenarios, do this before setting the ItemsSource:
this.ganttControl.EnforceDependencyConstraints = false;
this.ganttControl.ValidateDependencySetting = false;
this.ganttControl.ItemsSource = this.GetDataSource();
... and turn it back on like this after setting the ItemsSource:
// Good practice to enclose multiple settings within the DelayUpdates block to improve performance
using (new DelayUpdates())
{
this.ganttControl.EnforceDependencyConstraints = true;
this.ganttControl.ValidateDependencySetting = true;
}
� RadiantQ 2009 - 2019. All Rights Reserved.