python - Matplotlib (multi)threading with PyQt5 -


i trying develop pyqt5 application matplotlib, similar in structure accepted answer in how use qthread update matplotlib figure pyqt?

the problem facing performance. requirement application multiple(up 20) matplotlib graphs updated randomly, within milliseconds. each chart has 200-2000+ objects (lines , rectangles mostly). i've optimized plotting process as could, depending on number of objects on graph facing drawing times of approx 40-300ms per graph.

i hoping @ least use qthread offload drawing process (mainly .draw(), and/or uses figure()) thread keep gui responsive, seems drawing has done in main thread. therefore, other threading solution multiprocess or similar not work, too.

so basically, worst case szenario, if 20 graphs update @ same time gui unresponsive 20*300ms. understand it, using qmdisubwindow not result in subwindow use thread, until graphs updated, complete gui freeze.

i see following solutions problem:

  • switch plotting library, maybe 1 part of drawing process can threaded (or performance much, better). suggestions?
  • switch programming language (i.e. java , qt jambi. rule drawing has done in main thread of qt application not apply there too?)
  • spawn multiple, independent main gui processes, 1 each graph(so 1 window per graph), , let them communicate server process distributes data chart clients should plot.
  • use matplotlib in subthread / multiprocess thread, not widget. instead, create image, give image main process display. add more display latency (but improve gui responsiveness), , interacting image more difficult , result in reduced interaction options. unclean solution.

do understand situation right? there other, better ways?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -