vrayUpdateProxy takes long time in no-gui

I use this command for toggle visibility of VRayProxy.
Within Maya GUI, it runs fast.

For example, when I run the script like below,
cmds.vrayUpdateProxy('vrayproxy1', getObjectNames=True)
it tooks 0.002 seconds.

But, if I execute in maya batch.
it tooks over 1.5 seconds.

What is the reason for that?

HI, thanks for posting. Could you send us your test scene and batch file? We tried to reproduce the issue but on our side the times are almost identical. Please upload the files here or trough our support contact form. Please include a link to this thread in your e-mail if you choose the contact form.