Tango synoptic viewer laggy

Hi all,

In my project I need to display a synoptic of about 100 devices with about 200 attributes, also with many Dynamic Objects (e.g. lines and shapes' foreground colors).

So I have been using the tango's java built-in synoptic viewer (triggered inside Jdraw or seperately as fr.esrf.tangoatk.widget.jdraw.SimpleSynopticAppli), so far so good.

The problem is that I am running the viewer together with several Taurus Gui applications, all on a Raspberry Pi 4, and while the Taurus Gui programs are very smooth in updating the attribute values (usually < 1 second), the SimpleSynopticAppli is very laggy in updating changes of attribute (usually from 3 to 10 seconds which makes it not up to the requirement of my application).

For most of the attributes, I set a change event in the device_init() function of the device server, and push changes in their read and write functions.

In the Diagnostics menu of the synoptic viewer, I can see that the viewer seems to do both polling and event listening, and the update period is set at the default 1000 milliseconds (can't be lowered).

How can I improve? Could anyone share his experience?

Thanks!
Edited 3 years ago
Strangely, disabling events altogether in Device Servers make the viewer update in about 1 second or so.
For example, for a label associated with a device state, in pytango commenting out the following code so that the viewer has to poll the device state, and that makes the viewer update the label faster than pushing events for the listener of the viewer.
    def init_device(self):
Device.init_device(self)
#self.set_change_event('State', True, True)
self.set_state(DevState.OFF)

@command
def turn_on(self):
self.set_state(DevState.ON)
self.info_stream("ON")
#self.push_change_event('State', DevState.ON)

Any idea why?
Edited 3 years ago
Digging further, I can see that the viewer doesn't really listen to the events emitted by the device servers.
In the View->Error History of the viewer, I can see that it lists a lot of ERROR like this:
main/inverter/ivt01/frequency No heartbeat from dserver/inverter/1

And this is the java stack error info:

class fr.esrf.tangoatk.core.AttributeReadException
at
fr.esrf.TangoApi.events.TangoChangeEvent.getValue(TangoChangeEvent.java:67)
fr.esrf.tangoatk.core.attribute.NumberScalar.change(NumberScalar.java:554)
fr.esrf.TangoApi.events.TangoChange.fireTangoChangeEvent(TangoChange.java:112)
fr.esrf.TangoApi.events.TangoChange.access$000(TangoChange.java:48)
fr.esrf.TangoApi.events.TangoChange$1.run(TangoChange.java:96)
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


It's just like the viewer is having trouble connecting to tango, but it's not the case, since polling still working just fine.
This is quite weird because my TaurusForm client running on the same machine at the same time got the events just right.
Hello,
Could you try first with the last ATK release (9.3.22).
I fixed a bug recently concerning forwarded attributes. If you have forwarded attribute it may explains the issue.
It seems strange that the ATK client do both polling and event ? Could you post a screenshot of the Diagnostic windows ?
Did you try without Tango polling and by calling
set_change_event(true, false);
in your server init function ?
Dear Jean-Luc,

Thanks so much for your kind input.
I think I have just solved the problem, it has to do with host name.

Say I am using a local system with the host name raspberry. Naturally, since everything is local, I declare the TANGO_HOST environment variable in /etc/tangorc as:
TANGO_HOST=raspberry:10000

And I declare in /etc/hosts:
127.0.0.1    raspberry
127.0.0.1 localhost

Everything (tangodb, jive, taurus clients ect.) works fine, except for the java synoptic viewer.
I found that 192.168.42.53 is the real IpV4 address that the Wifi hotspot assigns to my host, so I tried changing the declaration in /etc/hosts:
192.168.42.53    raspberry
127.0.0.1 localhost

And IT WORKS.
So I think I am supposed to set a static Ip for my host (?)
Ok, that's nice if you manage to solve the issue :)
Jive is not using event and the network problem may come from java zmq when using event…
 
Register or login to create to post a reply.