Iterating over rows is very slow

Ask general questions here.
helloman
Posts: 1
Joined: Wed Mar 24, 2021 5:42 am

Iterating over rows is very slow

Post by helloman » Wed Mar 24, 2021 5:54 am

Hello ranorex.

I am using the free trial of your software.

Whenever i am trying to iterate over a list of rows in the ranorex usercode it is very slow. Sometimes it can take up to 800 milliseconds just to iterate over 20 rows.

The software i am trying to automate is java based with a Jtable that i am trying to retrieve rows from.

Here is the code i am using to get the rows from the table

Code: Select all

Table mytable = Host.Local.FindSingle<Table>("/form[@processname>'contriesdisplay']/container[@name='pnlParent']//container[@name='News']//container[@name='viewport']/table[@name='jTable']");

foreach (Row row in mytable.Rows) {
// do stuff
}


User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6553
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Iterating over rows is very slow

Post by odklizec » Wed Apr 07, 2021 9:05 am

Hi,

Unfortunately, it's pretty hard to tell what's wrong without seeing your app or, at very least, a sample app, featuring the table in question. Could you please provide one? It does not have to be entire app, just the table with number of rows. I assume the FindSingle is not the culprit, just the row iteration loop?

Since you are using Ranorex trial, I assume you are using most recent version (9.5.0)?
At next, have you tried to play with Java-related options in Ranorex Settings (Plugins tab)?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Mike K
Certified Professional
Certified Professional
Posts: 28
Joined: Wed Jun 28, 2017 5:58 pm

Re: Iterating over rows is very slow

Post by Mike K » Wed Apr 07, 2021 12:20 pm

Hi,

One option you can try is making the RxPath to the table fully qualified so there is less guess work for Ranorex to find it. However, 800ms for 20 rows is not too bad if you consider it takes a person a few seconds longer to scan 20 rows for the right information.

Hope that helps!

Cheers,
Mike