Commit 6d6af97b authored by Yori Fournier's avatar Yori Fournier
Browse files

forgot to update formatted on client-side now replotting is much faster

avoiding unecessary formatting.
parent ab30f39a
Pipeline #662 passed with stage
in 27 minutes and 11 seconds
...@@ -59,10 +59,13 @@ class MplClient(): ...@@ -59,10 +59,13 @@ class MplClient():
wf = self.sock.makefile(mode='wb') wf = self.sock.makefile(mode='wb')
print('makefile done') print('makefile done')
#~ if debug: #~ if debug:
print('Client sending ', if isinstance(sig, Query):
type(sig), print('Client sending {sig_type}, {query_type} with content {sig_content}'.format(sig_type=type(sig), query_type=sig.query_type, sig_content=sig.content))
' with content \"', else:
sig.content, '\"') print('Client sending ',
type(sig),
' with content \"',
sig.content, '\"')
try: try:
pickle.dump(sig, wf) pickle.dump(sig, wf)
except Exception: except Exception:
......
...@@ -681,6 +681,10 @@ class MplFig(metaclass=FigureClassFactory, context=CONTEXT.lower()): ...@@ -681,6 +681,10 @@ class MplFig(metaclass=FigureClassFactory, context=CONTEXT.lower()):
".format(dbug=DBUG)) ".format(dbug=DBUG))
if((self.reformat) or (not self.formatted)): if((self.reformat) or (not self.formatted)):
if(self.debug):
print('reformat: {0}, formatted: {1}'.format(self.reformat, self.formatted))
status = self.format_rawdata() status = self.format_rawdata()
if(not status): if(not status):
return(False) return(False)
...@@ -846,6 +850,7 @@ class MplFig(metaclass=FigureClassFactory, context=CONTEXT.lower()): ...@@ -846,6 +850,7 @@ class MplFig(metaclass=FigureClassFactory, context=CONTEXT.lower()):
side will report the errors. side will report the errors.
''' '''
self.remote_rawdata = rawdata self.remote_rawdata = rawdata
self.formatted = False
def _format_rawdata_client(self): def _format_rawdata_client(self):
""" send a signal to the server """ send a signal to the server
...@@ -859,6 +864,8 @@ class MplFig(metaclass=FigureClassFactory, context=CONTEXT.lower()): ...@@ -859,6 +864,8 @@ class MplFig(metaclass=FigureClassFactory, context=CONTEXT.lower()):
for ax, data in zip(self.get_axes(), datas): for ax, data in zip(self.get_axes(), datas):
ax.data = data ax.data = data
self.formatted = True
else: else:
print(SEVR + 'The figure is not properly synchronized.') print(SEVR + 'The figure is not properly synchronized.')
return(False) return(False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment