Ticket #8321 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[ICAT] Asynchronous loading

Reported by: Jay Rainey Owned by: Jay Rainey
Priority: minor Milestone: Release 3.1
Component: GUI Keywords: ICAT
Cc: Blocked By:
Blocking: #8274 Tester: Martyn Gigg

Description

Currently, the loading of files is not done asynchronously. This should be fixed, and any related algorithms used by ICAT (in ICatSearch2.cpp & ICatHelper.cpp) should be made asynchronous.

Change History

comment:1 Changed 7 years ago by Jay Rainey

  • Status changed from new to inprogress

Execute catalog algorithms asynchronously. Refs #8321.

  • Added a helper method to execute asynchronously to prevent duplication of code.

Changeset: 6b82094d63f9a2b0cf4334edcf7356a9391fcee8

comment:2 Changed 7 years ago by Jay Rainey

Make loading asynchronous. Refs #8321.

Changeset: e72f02ae80cd0da9b2779e3121a8a3428011b5ed

comment:3 Changed 7 years ago by Jay Rainey

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

To test

  1. Ensure all calls to algorithm->execute(); have been made Asynchronous (E.g. now call executeAsynchronously(). You could log into Mantid and try to perform actions while downloading large files (search WISH instruments, they have huge files).
  2. Code review to ensure the changes made are sensible and correct.

comment:4 Changed 7 years ago by Jay Rainey

  • Blocking 8274 added

comment:5 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:6 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I think the way that this has been implemented can be improved. Using a hard-coded loop that calls QCoreApplication::processEvents should usually be considered a last resort. It is better to allow the thread to continue and then hook up signals/slots for responding to when events finish.

There is a class in MantidQt called AlgorithmRunner. You could have a single AlgorithmRunner member variable that is used in ICatHelper::executeAsynchronously method that simply creates the algorithm & passes it to the AlgorithmRunner::start method. You can then hook up slots to the signals of the algorithm runner to respond when it finishes.

comment:7 Changed 7 years ago by Jay Rainey

  • Status changed from reopened to inprogress

Const correctness. Refs #8321.

Changeset: 1fca2b0cab37fafe29365cc9c0c08267d05812d2

comment:8 Changed 7 years ago by Jay Rainey

Merge branch 'feature/8244_icat_date_selector_issues' into develop. Refs #8321.

Conflicts:

Code/Mantid/Framework/ICat/src/CatalogSearch.cpp

Changeset: 00af51579e29f6d09db64f608fa72babf6ccdacd

comment:9 Changed 7 years ago by Jay Rainey

Fixed ICAT doxygen warnings. Refs #8321.

Changeset: a260d688978bef054fbe99c0f1057ef66eb3b5e3

comment:10 Changed 7 years ago by Jay Rainey

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

comment:11 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying

comment:12 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

After discussion we agreed that this approach is actually acceptable here given the requirements of the interface.

comment:13 Changed 7 years ago by Martyn Gigg

Merge remote-tracking branch 'origin/feature/8321_icat_asynchronous_algorithms'

Conflicts:

Code/Mantid/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/ICatSearch2.h

Refs #8321

Changeset: 2f1dd083845ed11ec80c7a61c39ca655a62d2115

comment:14 Changed 7 years ago by Martyn Gigg

Merge remote-tracking branch 'origin/feature/8321_icat_asynchronous_algorithms'

Conflicts:

Code/Mantid/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/ICatSearch2.h

Refs #8321

Full changeset: 2f1dd083845ed11ec80c7a61c39ca655a62d2115

comment:15 Changed 7 years ago by Jay Rainey

Merge branch 'feature/8244_icat_date_selector_issues' into develop. Refs #8321.

Conflicts:

Code/Mantid/Framework/ICat/src/CatalogSearch.cpp

Changeset: 00af51579e29f6d09db64f608fa72babf6ccdacd

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9166

Note: See TracTickets for help on using tickets.