Ticket #5036 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

[C2E] EnTran - Fix Slowdown in Interface

Reported by: Peter Parker Owned by: Peter Parker
Priority: major Milestone: Release 2.1
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Robert Whitley

Description (last modified by Peter Parker) (diff)

This needs to be fixed once and for all.

  • There seems to be a bug where FileFinder is called every time a button is pressed or box is checked in the interface. This should only happen (for now, anyway) when the focus leaves the MWRunFiles widget.

To (hopefully) reproduce, fill a folder with 200+ runs, add the folder to managed user directories, type in a range of runs, then use the other parts of the interface.

  • Once focus is lost from the MWRunFiles widget, it should try and find the files in a separate thread. Create findFilesAsync, a wrapper function for findFiles, to handle the creation of the thread in there. The thread should call findFiles, which may need to be modified to return a QFuture value. See QtConcurrent as a place to start, though QThread may eventually be more applicable here.

Change History

comment:1 Changed 9 years ago by Peter Parker

Still having difficulties reproducing this! Typing in a range of runs (on both Windows and Mac) and changing focus from the widget produces slow down, but once that is done there is no more slow down until the field is edited and focus changes again.

Implementing asychronous file finding in the widget anyway, as this will hopefully have a positive effect on the user's experience with the GUI.

comment:2 Changed 9 years ago by Peter Parker

  • Description modified (diff)

comment:3 Changed 9 years ago by Peter Parker

Refs #5036 - MWRunFiles now finds files asynchronously.

A thread started to find files whenever a user changes the content of the field and then changes focus to elsewhere. Both conditions have to be met before the thread starts. If the thread is already running, and new input is detected, then it is cancelled and restarted with the new files to find.

Changeset: b1f2cfe6ec761957e43282ccc2711b60fc22cdf7

comment:4 Changed 9 years ago by Peter Parker

Refs #5036 - Removing errant includes.

Changeset: cb21efb439516b7936a386b85436d2e91b07d148

comment:5 Changed 9 years ago by Stuart Campbell

Flag field as modified when browsing. refs #5080 & #5036

The filename field wasn't being flagged as modified when only browsing to the filename - therefore the finder was never executed.

Changeset: 66aa2c897e49d202816d90b13f1421a33f1b518b

comment:6 Changed 8 years ago by Peter Parker

Refs #5036 - Fix for Muon interface - additional MWRunFiles signal.

Added an extra signal to MWRunFiles to help distinguish between when a user has finished typing (fileEditingFinished()) and when the file finding process has finished (fileFindingFinished()). Note that this signal is different to the filesFound signal in that fileFindingFinished() is emitted whether the files have been found or not.

Changed the Muon Analysis interface to wait for fileFindingFinished() instead of fileEditingFinished().

Changeset: a8a4b191bcbae116c8f780d22b378343f5390169

comment:7 Changed 8 years ago by Peter Parker

Refs #5036 - Fix for multi file selection via browse.

Whitespace is now removed properly.

Changeset: 67fe730fd18900dbec714f3899dc647ea1406c7f

comment:8 Changed 8 years ago by Peter Parker

Refs #5036 - Clearing up functions re setting text on widget.

Hopefully making the differences between setText, setUserInput and setFileText a little clearer via comments, and removing some errant calls.

Changeset: ae9cccb9d01b2f58eb1dfcba2c6469619bb4dbce

comment:9 Changed 8 years ago by Peter Parker

Refs #5036 - Trim individual file strings in MWRunFiles.

We still need to trim individual file strings in the case where a user passes "<file>, <file>".

Changeset: 1e6c51d5e461c36259c195353bfbd10fbce9f44c

comment:10 Changed 8 years ago by Peter Parker

Refs #5036 - Trim individual file strings in MWRunFiles.

We still need to trim individual file strings in the case where a user passes "<file>, <file>".

Changeset: 1e6c51d5e461c36259c195353bfbd10fbce9f44c

comment:11 Changed 8 years ago by Peter Parker

  • Status changed from new to accepted

comment:12 Changed 8 years ago by Peter Parker

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

Closing. Testing details to follow.

comment:13 Changed 8 years ago by Peter Parker

This is difficult to test, as we were never even able to reproduce the slowdown properly anyway! Timmy has tried Mantid since the change however, and is pleased with the improvement in GUI responsiveness.

Testing should instead revolve around seeing if any functionality has been broken, ie. making sure that typing in "12964", or "12964-12999" works, and that browsing to files or ranges of files still works.

(Note, #5207 has already been raised to disable the "Run" button while files are being found.)

comment:14 Changed 8 years ago by Robert Whitley

  • Status changed from verify to verifying
  • Tester set to Robert Whitley

comment:15 Changed 8 years ago by Robert Whitley

  • Status changed from verifying to closed

Files and a range of files have no problem loading.

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5882

Note: See TracTickets for help on using tickets.