This project is read-only.

slow performance when retrieving rows from a large data grid

Mar 18, 2010 at 10:14 AM


I am currently experiencing very slow performance when trying to select an item from a grid which has more than 300 items. It seems that the Table class retrieves all of the rows before trying to find the requested row e.g.

 public virtual TableRow Row(string column, string value)
            return Rows.Get(column, value);

 and the rows are retrieved via the TableRowFactory class in the following manner:

private List<AutomationElement> GetRowElements()
            AutomationElementCollection descendants = automationElementFinder.Descendants(AutomationSearchCondition.ByControlType(ControlType.Custom));
            var automationElements = new BricksCollection<AutomationElement>(descendants);
            return automationElements.FindAll(rowPredicate);


The search for a specific row can take as long as  20 minutes. Position based search via xml files seems to help when there is a small number of elements, however as soon as the number is increased the search starts being very slow. Has anyone come accross this problem, and found a solution? Is there a way to modify this search to "FindFirst" instead of "FindAll"? There was a suggestion by Kannan ( ) on this board to modify the GetRowElements method, however that solution doesn't seem to improve performance.

any info would be helpful




Mar 24, 2010 at 6:02 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.