Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Speed up canvas redraw for GTK3Agg backend.#12030
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Move `_render_figure()` call out of `on_draw_event` handlerin `FigureCanvasGTK3Agg` class and call it from overloaded`draw()` method.Fixes#12010Gtk triggers `draw` event not only when actual plot redrawrequired but also when any another widget drawn over canvas.This makes application with embided plot unresponsive in caseswhen 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:* animation from examples/ directory* interacive pan and zoom* cursor widget with bliting* calling draw_idle() to update interactive chart
my bad, still have some issues with this patch, I'll fix it |
Fix for previous commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I tested the solution and seems to work fine.
@tacaswell are we enforcing all the coverage tests? |
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. |
PR Summary
Move
_render_figure()
call out ofon_draw_event
handlerin
FigureCanvasGTK3Agg
class and call it from overloadeddraw()
method.Fixes#12010
Gtk triggers
draw
event 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