jlperez
11 years agoOccasional Contributor
Any performance issue in Find, FinChild ... funtions family in TC 10?
Hi all,
Is there any performance issue regarding the family of methods Find, FindChild, … used for searching GUI objects in a Web application?. To be more concrete, I’m using the following instruction to find a child starting from a parent object in the object hierarchy:
pChild = pParent["Find"]("FullName", strChildFullName, 1);
I’m using the FullName property and the third parameter is set to 1 (depth in the object hierarchy till the search will be done). Previously I used the same instruction but with the third parameter set to 200 for example, to search as deeply was necessary. The problem was that it took me a lot of time so I managed to do the same by calling the Find method as indicated above (I gained in performance). All this was in TC 9.31 version.
One week ago I upgraded to TC 10, and it seemes to me that the instruction above takes more time than before. I’ve measured the time this way:
if (GC_Perf_Debug == 1)
{
int_StartTime=Win32API.GetTickCount();
}
pChild = pParent["Find"]("FullName", strChildFullName, 1);
if (GC_Perf_Debug == 1)
{
int_StopTime=Win32API.GetTickCount();
int_res = int_StopTime - int_StartTime;
Log["Message"]("Time employed (ms) = " + int_res);
}
And some times it takes around 1500 msec to execute or even more. This time makes my automated testing too slow. Is there any issue related to this situation?
Any help would be very appreciated, thanks a lot in advance.
JP.
Is there any performance issue regarding the family of methods Find, FindChild, … used for searching GUI objects in a Web application?. To be more concrete, I’m using the following instruction to find a child starting from a parent object in the object hierarchy:
pChild = pParent["Find"]("FullName", strChildFullName, 1);
I’m using the FullName property and the third parameter is set to 1 (depth in the object hierarchy till the search will be done). Previously I used the same instruction but with the third parameter set to 200 for example, to search as deeply was necessary. The problem was that it took me a lot of time so I managed to do the same by calling the Find method as indicated above (I gained in performance). All this was in TC 9.31 version.
One week ago I upgraded to TC 10, and it seemes to me that the instruction above takes more time than before. I’ve measured the time this way:
if (GC_Perf_Debug == 1)
{
int_StartTime=Win32API.GetTickCount();
}
pChild = pParent["Find"]("FullName", strChildFullName, 1);
if (GC_Perf_Debug == 1)
{
int_StopTime=Win32API.GetTickCount();
int_res = int_StopTime - int_StartTime;
Log["Message"]("Time employed (ms) = " + int_res);
}
And some times it takes around 1500 msec to execute or even more. This time makes my automated testing too slow. Is there any issue related to this situation?
Any help would be very appreciated, thanks a lot in advance.
JP.
- If you already have FullName of an object why are you searching for it again?
You can just make something like that:
eval(strChildFullName)["Click"]();