Table performance

Feb 2, 2009 at 7:41 AM
I have a DataGridView and access it as a Table, all works fine I get the UIItem can focus and click but the performance is very slow. On a grid (20 columns X 20 rows) it takes about a min to get rows counts.
I checked with profiler and most of the time is spent in

Core.UIItems.TableItems.TableRow.get_Cells() 5.143 0.000 54860 0
Core.Factory.TableCellFactory.CreateCells(class Core.UIItems.TableItems.TableHeader,class System.Windows.Automation.AutomationElement) 5.143 0.000 54860 0
Core.AutomationElementSearch.AutomationElementFinder.Descendants(class Core.AutomationElementSearch.AutomationSearchCondition) 34.810 0.000 371318 0
System.Windows.Automation.AutomationElement.FindAll(valuetype System.Windows.Automation.TreeScope,class System.Windows.Automation.Condition) 68.324 0.000 728801 0
MS.Internal.Automation.UiaCoreApi.UiaFind(class MS.Internal.Automation.SafeNodeHandle,valuetype MS.Internal.Automation.UiaCoreApi/UiaFindParams,class System.Windows.Automation.Condition,class MS.Internal.Automation.UiaCoreApi/UiaCacheRequest) 93.625 0.000 998685 0

This is the way I am using the Table

 

task = app.GetWindow(

"Task", InitializeOption.NoCache.AndIdentifiedBy("Task"));
taskTabs = task.Get<
Tab>("TabWorkspace");
taskTabs.Pages[2].Select();
var grid = task.Get<Table>(SearchCriteria.ByAutomationId("dataGridView"));
txtLog.Text +=
"Grid - " + grid.Name + " Rows - " + grid.Rows.Count + Environment.NewLine;

 

Is there any way to improve the performance or may be I am doing something wrong?

Thanks,
Roman.

Coordinator
Feb 8, 2009 at 4:24 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.