After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765358 - map: avoid handling GtkAdjustment signals when hidden
map: avoid handling GtkAdjustment signals when hidden
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-21 03:43 UTC by Christian Hergert
Modified: 2016-04-21 22:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
map: avoid handling GtkAdjustment signals when hidden (3.46 KB, patch)
2016-04-21 03:44 UTC, Christian Hergert
committed Details | Review

Description Christian Hergert 2016-04-21 03:43:59 UTC
This improves performance of cursor movements in test-widget
when the GtkSourceMap is hidden. This is not an entirely
uncommon design, as both Gedit and Builder simply hide the
widget when it is not in use.

Another thing to look at longer term would be to delay those
updates until the ::update() phase of the frame clock.
Comment 1 Christian Hergert 2016-04-21 03:44:07 UTC
Created attachment 326468 [details] [review]
map: avoid handling GtkAdjustment signals when hidden

It is often the case that a GtkSourceMap will be packed into the widget
hierarchy, but not visible unless the user has enabled the feature.

This means that we receive a lot of signal notifications when we can't
do anything about it. So instead, toggle the signal activity based on
whether or not we are visible.
Comment 2 Paolo Borelli 2016-04-21 08:11:10 UTC
Review of attachment 326468 [details] [review]:

sure, you are the sourcemap boss :)
Comment 3 Christian Hergert 2016-04-21 22:08:11 UTC
Attachment 326468 [details] pushed as ef176f1 - map: avoid handling GtkAdjustment signals when hidden