Ticket #5048 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

LiveData GUI: consider thread-safety and performance

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.1
Component: Mantid Keywords: LiveData
Cc: Blocked By:
Blocking: Tester: Stuart Campbell

Description

The worst case scenario is having a live plot of a big event workspace. When you display it, the event list is being sorted. If a new chunk of data gets added at the same time, bad things happen.

There is also the possibility of a queue of "update" signals being sent and piling up if drawing is slower than updates.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Janik Zikovsky

  • Keywords LiveData added

comment:3 Changed 9 years ago by Janik Zikovsky

Refs #5048: Listener was not destroyed when cancelled

if called from StartLiveData

Changeset: 0091741441f0b017aaedcd95d3d63fd05f5cf61b

comment:4 Changed 9 years ago by Janik Zikovsky

Refs #5048: read/write locking of workspace in live data

and plotting. Too much debugging output

Changeset: d293ef6135681157712cc09b5ff63124f22dce15

comment:5 Changed 9 years ago by Janik Zikovsky

Refs #5048: sortEvents inside LoadLiveData to help the GUI cope

with PreserveEvents. This will slow down the adding but prevent the GUI from locking up.

Changeset: 769af334f78b7f16e7bffe90caa4c7b9571a4af2

comment:6 Changed 9 years ago by Janik Zikovsky

Refs #5048: keep write lock when sorting events

Changeset: 55f989632b13f63de4cdb7806a38067ac690fc50

comment:7 Changed 9 years ago by Janik Zikovsky

Refs #5048 removed extra debugging output

Changeset: 2275c364a6d2243f84c9128f32b8ae797070f2f4

comment:8 Changed 9 years ago by Janik Zikovsky

Refs #5048: try to make MonitorLiveDataTest more stable on windows

Changeset: 09e5be55a677324a3ef0b1eadb1c2307045a2acd

comment:9 Changed 8 years ago by Janik Zikovsky

Refs #5048 fix deadlock with concurrent python scripts

related to DataService and python notifications. Two scripts that very quickly creates and adds workspaces can run concurrently now (if you dont display)

Changeset: e6c8ec1fc3d0d5b62f971a30dcc948c478369162

comment:10 Changed 8 years ago by Janik Zikovsky

Refs #5048 further deadlock avoidance

Changeset: efb4809b85f25edae05821d6defc278dc05f0f85

comment:11 Changed 8 years ago by Janik Zikovsky

Refs #5048 fix thread-safety tesT

Changeset: a4576b64b1ba8895a201b000eb70c53aa4de4f61

comment:12 Changed 8 years ago by Janik Zikovsky

Refs #5048 remove debugging output

Changeset: a2435cf6442543c2fca0393ad2492666a83efdb6

comment:13 Changed 8 years ago by Janik Zikovsky

Refs #5048 fix deadlock with concurrent python scripts

related to DataService and python notifications. Two scripts that very quickly creates and adds workspaces can run concurrently now (if you dont display)

Changeset: e6c8ec1fc3d0d5b62f971a30dcc948c478369162

comment:14 Changed 8 years ago by Janik Zikovsky

Refs #5048 further deadlock avoidance

Changeset: efb4809b85f25edae05821d6defc278dc05f0f85

comment:15 Changed 8 years ago by Janik Zikovsky

Refs #5048 fix thread-safety tesT

Changeset: a4576b64b1ba8895a201b000eb70c53aa4de4f61

comment:16 Changed 8 years ago by Janik Zikovsky

Refs #5048 remove debugging output

Changeset: a2435cf6442543c2fca0393ad2492666a83efdb6

comment:17 Changed 8 years ago by Janik Zikovsky

Refs #5048: debugging output for testing GUI updates

will revert, only checking this in for history and possible re-use later

Changeset: 359c626ff8f9ea180b8e15d514ce69a9c0181536

comment:18 Changed 8 years ago by Janik Zikovsky

Revert "Refs #5048: debugging output for testing GUI updates"

This reverts commit 8b2c35793abddcfc7ec2fe56fb41de397d115ecf.

Changeset: 0c8e544216e3290c21d4027d22dede6dee2f3b7f

comment:19 Changed 8 years ago by Janik Zikovsky

Refs #5048: Thread-safe AlgorithmManager

Fixes an occasional abort with LiveData viewing and another script in the background

Changeset: 920231ee634c6912901ca668e209d9d6f78df358

comment:20 Changed 8 years ago by Janik Zikovsky

  • Status changed from accepted to verify
  • Resolution set to fixed

Note to testers: the thread-safety tests I have done were mostly with the fake event data listener, as of right now we do not have access to a real listener to test with.

You can try to break the system by requesting excessive amounts of data and refreshing too quickly. Also test running python scripts, algorithms, etc. while the live data monitor is working (quickly) in the background.

Could particularly use testing on Win/Mac since I did not even try it there.

comment:21 Changed 8 years ago by Janik Zikovsky

Refs #5048: debugging output for testing GUI updates

will revert, only checking this in for history and possible re-use later

Changeset: 359c626ff8f9ea180b8e15d514ce69a9c0181536

comment:22 Changed 8 years ago by Janik Zikovsky

Revert "Refs #5048: debugging output for testing GUI updates"

This reverts commit 8b2c35793abddcfc7ec2fe56fb41de397d115ecf.

Changeset: 0c8e544216e3290c21d4027d22dede6dee2f3b7f

comment:23 Changed 8 years ago by Janik Zikovsky

Refs #5048: Thread-safe AlgorithmManager

Fixes an occasional abort with LiveData viewing and another script in the background

Changeset: 920231ee634c6912901ca668e209d9d6f78df358

comment:24 Changed 8 years ago by Stuart Campbell

  • Status changed from verify to verifying
  • Tester set to Stuart Campbell

comment:25 Changed 8 years ago by Stuart Campbell

Been playing with the Live data stuff for about a day trying to break it. Seems to be very stable, been running 7 instances, all with preserve events=true, and all seems happy. Also applies to #4787, #4803, #5048, #4812, #4801, #4920

comment:26 Changed 8 years ago by Stuart Campbell

Seems to be very stable on the mac (ran ~8 hours ok)

comment:27 Changed 8 years ago by Stuart Campbell

  • Status changed from verifying to closed

Ran on windows with 7 live sessions at the same time. Is 7 a hard limit ?

comment:28 Changed 8 years ago by Janik Zikovsky

Poco seemed to give me a limit of 8 simultaneous threads (I have 8 cores on my machine); including the GUI it seemed to leave 7 avaiable threads. So it might be machine-dependent.

OK I just tried it on TOPAZ and get a limit of 7 too. Something wrong with Poco perhaps?

comment:29 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5894

Note: See TracTickets for help on using tickets.