Slow looping through vCenter objects since upgrade from vRO 7.2 to 7.4

This post was originally published on this site

Since I upgraded our vRO standalone installation from vRO 7.2 to 7.4 we have performance issues while executing code which looping though a large number of vCenter objects (like vm oder vmFolder objects).

 

I`m using following code:

 

var ret = VcPlugin.getAllVirtualMachines();

var time = new Date();

var start = time.getTime();

var i = 0;

var allVmNames = [];

for each(var vm in ret) {

      allVmNames.push(vm.name);

      if ((++i % 1000) == 0){

           System.log (“inserts: ” + i);

      }

}

var time = new Date();

var end = time.getTime();

 

               System.log (“Start:     ” + start);

               System.log (“End:      ” + end);

System.log (“Difference: ” + (end – start));

 

    

 

 

Result vRO 7.2:

2018-05-04 07:18:54.980] [I] Ergebnis: 5557

[2018-05-04 07:19:35.745] [I] inserts: 1000

[2018-05-04 07:20:37.296] [I] inserts: 2000

[2018-05-04 07:21:36.996] [I] inserts: 3000

[2018-05-04 07:22:36.400] [I] inserts: 4000

[2018-05-04 07:23:37.950] [I] inserts: 5000

[2018-05-04 07:24:11.751] [I] Start:     1525411134982

[2018-05-04 07:24:11.757] [I] Ende:      1525411451749

[2018-05-04 07:24:11.760] [I] Differenz: 316767

 

Result vRO 7.4:

[2018-05-04 07:18:13.604] [I] Ergebnis: 5557

[2018-05-04 07:18:13.644] [I] inserts: 1000

[2018-05-04 07:18:13.682] [I] inserts: 2000

[2018-05-04 07:18:13.705] [I] inserts: 3000

[2018-05-04 07:18:13.729] [I] inserts: 4000

[2018-05-04 07:18:13.747] [I] inserts: 5000

[2018-05-04 07:18:13.758] [I] Start:     1525411093614

[2018-05-04 07:18:13.760] [I] Ende:      1525411093756

[2018-05-04 07:18:13.762] [I] Differenz: 142

 

As you can see the execution time is in vRO 7.4 is much longer than in 7.2.

 

Does anyone see the same behavier after the updrage?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.