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

Improve ChartMPL performance #2943

Merged
merged 2 commits into from
Jul 6, 2022
Merged

Improve ChartMPL performance #2943

merged 2 commits into from
Jul 6, 2022

Conversation

dcbr
Copy link
Contributor

@dcbr dcbr commented Jul 5, 2022

Overview

As pointed out in #2932, the _redraw method of ChartMPL instances was called excessively (on every VTK render step), causing some performance issues.
Resolves #2932.

Details

With this PR, ChartMPL instances are only redrawn when the matplotlib figure changes (draw_event callback) or the Plotter window is resized.

@github-actions github-actions bot added the bug Uh-oh! Something isn't working as expected. label Jul 5, 2022
@dcbr dcbr mentioned this pull request Jul 5, 2022
1 task
@codecov
Copy link

codecov bot commented Jul 5, 2022

Codecov Report

Merging #2943 (d599823) into main (d91e2a9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2943   +/-   ##
=======================================
  Coverage   94.07%   94.08%           
=======================================
  Files          76       76           
  Lines       16534    16538    +4     
=======================================
+ Hits        15555    15559    +4     
  Misses        979      979           

@dcbr dcbr marked this pull request as ready for review July 5, 2022 15:56
Copy link
Member

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link
Member

@tkoyama010 tkoyama010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tkoyama010 tkoyama010 merged commit 21e4b3c into pyvista:main Jul 6, 2022
@dcbr dcbr deleted the fix/chart_mpl branch September 6, 2022 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChartMPL redraws too readily
3 participants