typing helper makes reading of Tango attributes 2 times more
(found by @debionne )
From the shell, with typing helper ON, reading a Tango attributes makes 3 calls to the device: 1 to retrieve the value for the shell, and 2 times more because of the typing helper.
Bad code is from bliss/shell/cli/typing_helper.py
:
def get_obj_from_text(text, ns):
"""text should not contain ( ) ..."""
text_split = text.split(".")
if text_split[0] in ns:
obj = ns[text_split[0]]
for subtext in text_split[1:]:
if hasattr(obj, subtext):
obj = getattr(obj, subtext, None) <<<<<<<<<< PROBLEM
else:
return None
return obj
else:
return None
Edited by Matias Guijarro