RadiantQ WPF Gantt
Performance Optimization Options
Previous Topic  Next Topic 

Vertical UI Virtualization

Please see this topic on how to enable vertically virtualized rendering in the chart area.


On a related topic, you can also vertically scroll fast if you turn on "deferred scrolling" in the FlexyTable as follows:

<fxgantt:FlexyTable ScrollViewer.IsDeferredScrollingEnabled="True">


This is illustrated in the sample "Samples\FlexyGantt\Misc\PerformanceSampleHierData"


Horizontal UI Virtualization


By default the FlexyGantt renders all the tasks within a currently visible row in the chart area, even if the tasks are currently out of view. This is the default behavior for the following reasons:

a) Zooming and paging the chart will be smooth.

b) If you have adorner templates that results in UI that renders outside the task's time span, this ensures that in some scenarios, even if the tasks are not visible, it's adorners might be.

c) In changing row-heights scenario, because of overlapped tasks a row's height won't change dynamically as you scroll horizontally.


However there are scenarios where you might have to render hundreds of thousands of tasks per row. This will definitely slow down the gantt as it tries to render all the tasks within the visible rows. This can be avoided by instructing the FlexyGantt to only render those tasks that are currently in view as follows:


<fxgantt:FlexyGantt x:Name="fxgantt" ..........  

                           UseTimeRangeFilteredTasksInRows="True" TimeRangeFilteredTasksTimeBuffer="2.00:00:00" FilterTasksByTimeRange="fxgantt_FilterTasksByTimeRange"

                           />


Let us look at the above 3 settings in detail:


a) UseTimeRangeFilteredTasksInRows="True"

This tells the gantt that we only want to display the tasks that are currently within the chart's view span. The gantt will then by default, parse through the entire list of tasks to be rendered within a row, determine which tasks are currently view and render only those. This can however be further optimized by handling the FilterTasksByTimeRange event as discussed below.

b) TimeRangeFilteredTasksTimeBuffer="2.00:00:00"

This tells the gantt to apply a buffer to the chart's time range while filtering.

c) FilterTasksByTimeRange="fxgantt_FilterTasksByTimeRange"

As mentioned above, parsing the entire list of tasks to be rendered within a row, every time the chart's time range changes (due to paging or zooming) is not very efficient. Knowing the bound data more intimately, you can optimize this "filtering" better within your applications.

You can do so by listening to the above event. In your listener you can use the most optimal way to determine which set of tasks fall under the current chart view span.

For example, if the tasks in your bound list are all ordered by time, then doing a binary search to determine the left most visible item, in the current view span, would improve the time taken to filter the list exponentially.

This is illustrated in the sample FlexyGantt/Real World Samples/ServerStatusWithHugeData. In this sample, using this approach, some 16000 tasks per row are visualized within the FlexyGantt, without any degradation in loading, paging and zooming times.



� RadiantQ 2009 - 2019. All Rights Reserved.