If your DeviceProxy takes 3 seconds there is a problem with your setup. How long does it take to ping the host where the device is on? 3 seconds is the default timeout with Tango. Maybe your DeviceProxy is timing out and not really connecting to the device. Have you tried to ping the device with the Test device application in jive? How long does it take?
Hi Andy,
Just one comment concerning the benchmark: I think your test is a little bit unfair to Tango
You include in benchmark the time to import PyTango.
Changing it a bit gives more interesting numbers:
import timeit
number = 1000
t = timeit.timeit('dp=PyTango.DeviceProxy("sys/tg_test/1")', 'import PyTango', number=number)
print('{0} calls took {1} ({2} ms/call)'.format(number, t, t/number*1000.))
Hi all,
Thank you Andy and TCoutinho for reply,
As Andy said [quote]there is a problem with your setup,[/quote]
Particularly with network setup problems, remote host is not available on the local network.
Because of which following errors can be also be seen,
Clearly it can also be noted that time is taken equivalent to default timeout period.
So we need to check if particular host is available or not in multiple-host environment before trying for device proxy.
Any suggestions about how to check it in tango way?
TCS_GMRT,
you can check the host is available with a ping or telnet. I don’t know if we can reduce the timeout at the import time from 3s to a few ms. I have to ask the experts. Then you could do a dev_ping(). This way you know if the device server and database are available.
Cheers
Andy