Speed up canvas redraw for GTK3Agg backend.#12030
Merged
Merged
Conversation
Move `_render_figure()` call out of `on_draw_event` handler in `FigureCanvasGTK3Agg` class and call it from overloaded `draw()` method. Fixes #12010 Gtk triggers `draw` event not only when actual plot redraw required but also when any another widget drawn over canvas. This makes application with embided plot unresponsive in cases when popover or popup menu are drawn over plot. You may try example provided in #12010. Moving actual plot redraw out of `on_draw_event()` makes GUI much more responsive. This changes tested with: * animation from examples/ directory * interacive pan and zoom * cursor widget with bliting * calling draw_idle() to update interactive chart
tacaswell
approved these changes
Sep 6, 2018
Member
|
attn @fariza @OceanWolf |
Contributor
Author
|
my bad, still have some issues with this patch, I'll fix it |
Fix for previous commit.
fariza
approved these changes
Sep 14, 2018
Member
fariza
left a comment
There was a problem hiding this comment.
I tested the solution and seems to work fine.
Member
|
@tacaswell are we enforcing all the coverage tests? |
Contributor
|
Only on a best-effort basis for the interactive backends; I think this PR can go in if you're happy with it regardless of coverage. |
QuLogic
approved these changes
Sep 19, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Move
_render_figure()call out ofon_draw_eventhandlerin
FigureCanvasGTK3Aggclass and call it from overloadeddraw()method.Fixes #12010
Gtk triggers
drawevent not only when actual plot redrawrequired but also when any another widget drawn over canvas.
This makes application with embided plot unresponsive in cases
when popover or popup menu are drawn over plot.
You may try example provided in #12010.
Moving actual plot redraw out of
on_draw_event()makes GUImuch more responsive.
This changes tested with:
PR Checklist