Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace draw with draw_idle for some functions #37052

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

thomashampson
Copy link
Contributor

@thomashampson thomashampson commented Mar 21, 2024

Description of work

Replacing canvas.draw() with canvas.draw_idle() to improve plotting performance.

Summary of work

In figuremanager.py replace canvas.draw with canvas.draw_idle() in the functions:-

  • replaceHandle
  • renameHandle
  • deleteHandle

Purpose of work

This is the first step to trying to resolve the issues as outlined in #37030 . It is one of the suggestions that has been made by super users. Initial testing suggests it will definitely make a difference but more testing with users is needed before we can say the original issue is resolved.

The plan is to test this a bit more and then get it merged in to see if it reduces the crashes being reported through Error Reporter.

Report to: see issue #37030 for more details

Notes from Jonathan/Core team
We think this PR will solve a lot of the plotting problems but not those described in #37030 which is based around the quantity of data plotted, we've seen similar problems in older version.

I have written up #37046 to describe the issue this PR will fix

To test:

See #37046

Fixes #37046

This does not require release notes because it is anticiapted more will need to be done to resolve the original issue and a release note for overall improvements will be added then.


Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

In figuremanager.py replace canvas.draw with canvas.draw_idle() for
- replaceHandle
- renameHandle
- deleteHandle

To improve plotting especially on Linux
@thomashampson thomashampson marked this pull request as ready for review March 21, 2024 12:02
@thomashampson thomashampson added Patch Candidate Urgent issues that must be included in a patch following a release Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) High Priority An issue or pull request that if not addressed is severe enough to postponse a release. ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS labels Mar 21, 2024
@thomashampson thomashampson added this to the Release 6.9.1 milestone Mar 21, 2024
@jhaigh0 jhaigh0 linked an issue Mar 21, 2024 that may be closed by this pull request
@jhaigh0
Copy link
Contributor

jhaigh0 commented Mar 21, 2024

doc test failure will be fixed by #37053

@thomashampson thomashampson merged commit f482b46 into release-next Mar 21, 2024
9 checks passed
@thomashampson thomashampson deleted the draw_idle_patch branch March 21, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) High Priority An issue or pull request that if not addressed is severe enough to postponse a release. ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS Patch Candidate Urgent issues that must be included in a patch following a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Live data updates causing plots to freeze
3 participants