Forum Discussion

nem's avatar
nem
Occasional Contributor
13 years ago

Extremely slow table cells interaction

Hello.

I have problem when trying to interact with an html table cells (~60 rows and 25 columns).

The way table looks in “object browser” is the following:

Table(0)

    Cell(0,0)

    Cell(0,1)

    Cell(0,…)

    Cell(1,0)

    Cell(1,1)

    Cell(1,2)

    Cell(…,…)

I need to select a row based on search criteria (an array of column names and cell values).So, I implemented some kind of a search mechanism, searching for necessary table row parsing columns one by one.  I get all cell objects from a column via FindAllChildren method into array of objects. Then access cell objects one by one searching for necessary text in a cell (I see that this part of code is too slow ((( ). The problem is that it takes extremely much time.

So, I wonder if somebody has ideas about the reason or how the speed can be improved.

2 Replies

  • Hi,



    First of all, I recommend that you read this article and try implementing the suggestions from it. If this doesn't help, try iterating through records in your table by using its internal properties instead of using FindAllChildren.
  • nem's avatar
    nem
    Occasional Contributor
    Hi Jared,



    I already used steps from the first article and it didn't help; but, point 2 really works for me! It's flying now!



    Thanks,

    Aliaksei