cancel
Showing results for 
Search instead for 
Did you mean: 

Extremly slow Array proccessing (VBS)

Highlighted
Occasional Contributor

Extremly slow Array proccessing (VBS)

Hi,

writting a VBS to test .net app based on Janus GridEx.



I managed to get data from two GridExes into two different Arrays. Now I want to compare the data.




For i = Lbound(ArrNew,1) to Ubound(ArrNew,1)



   For k = Lbound(ArrNew,2) to Ubound(ArrNew,2)



      newV = ArrNew(i,k)



      refV = ArrRef(i,k)



      log.Message newV



      log.Message refV



   next



next



 


The arrays are about (5,6) filled with decimal numbers. TC fails to proccess them - I get a minute lag when moving to next records and the test timeouts. Does TC has a performance issue with arrays or am I doing sth terribly wrong?




42,577185                      17:56:13 Normal  

42,577185                      17:56:13 Normal 

29,511006                      17:56:14 Normal  

29,511006                      17:56:14 Normal  

VBScript runtime error.   17:57:14 Normal  



This operation was canceled because the method invoke timeout has expired.

Error location:

Unit: "VBS_GEN1\VBS_1\Script\Estimate"

Line: 324 Column: 7.



regards


4 REPLIES 4
Highlighted
Valued Contributor

Try this and see if it has problems...




For i = Lbound(ArrNew,1) to Ubound(ArrNew,1)



   For k = Lbound(ArrNew,2) to Ubound(ArrNew,2)



      newV = ArrNew(i,k)



      refV = ArrRef(i,k)



      'log.Message newV



      'log.Message refV



   next



next



''-Praise the sun and Give Kudos.''
Highlighted
Occasional Contributor

Thanks, it works without log.message lines.



It seems that TC has some issue with fast proccessing of log commands, because the following variant also works:




For i = Lbound(ArrNew,1) to Ubound(ArrNew,1)



  For k = Lbound(ArrNew,2) to Ubound(ArrNew,2)



    newV = ArrNew(i,k)



    refV = ArrRef(i,k)



    log.Message newV



    log.Message refV



    delay(50)



  next



next



 


Highlighted
Valued Contributor

Well you have to take into account that the log is generating html and other data. Also (assuming my bad math is correct) you would have had about 31,250 messages written to the log which would cause...issues :). Anyhow I'm glad that worked for you, take care!

''-Praise the sun and Give Kudos.''
Highlighted
Occasional Contributor

IK, found it. I DID sth terribly wrong.



On different loop, which populated the arrays instead using



arr(k,j) = some value



I used



Set arr(k,j) = some value



results were disasterous for the performance...
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors