Hi team,
We know that we need to leverage the UI Virtualization of RadGridView to improve its performance. But sometimes I still suffer some big latency, so I would want to know which part of is to be blamed. One of ways i know is shown below.
private Stopwatch _watch;private ILog _log;public HistoryData(){ InitializeComponent(); this._log = LogManager.GetLogger(typeof (App)); _watch = Stopwatch.StartNew(); this.HistoryDataGridView.Filtering += this.ResetTime; this.ResetTimeAndSubscribeToLayoutUpdated();}private void ResetTime(object sender, GridViewFilteringEventArgs e){ ResetTimeAndSubscribeToLayoutUpdated();}private void ResetTimeAndSubscribeToLayoutUpdated(){ this.HistoryDataGridView.LayoutUpdated += this.HistoryDataGridView_LayoutUpdated; this._watch.Restart();}private void HistoryDataGridView_LayoutUpdated(object sender, EventArgs e){ this.HistoryDataGridView.LayoutUpdated -= this.HistoryDataGridView_LayoutUpdated; _log.Info(string.Format("GridView operations take {0} ms", this._watch.ElapsedMilliseconds));}The elapsed milliseconds logged here is usually no more than 3000, but sometimes, I feel like it's taking 6~9 seconds to display the final GridView. So i want to know deeper insights of where and when the GridView spend time on
Thanks,
-J