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 695466 - Improve input chooser filtering responsiveness
Improve input chooser filtering responsiveness
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Region & Language
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
3.10
Depends on:
Blocks:
 
 
Reported: 2013-03-08 21:07 UTC by Rui Matos
Modified: 2021-06-09 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
region: Add all widgets at input chooser start (14.83 KB, patch)
2013-03-08 21:07 UTC, Rui Matos
needs-work Details | Review
region: Rate limit the input chooser filtering (2.21 KB, patch)
2013-03-08 21:07 UTC, Rui Matos
committed Details | Review
region: Stop focusing the input chooser entry if already focused (1.87 KB, patch)
2013-03-08 21:07 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-03-08 21:07:07 UTC
You might have noticed that the input chooser filtering can feel quite
slow. This patch set tries to address that. No UI changes in here.
Comment 1 Rui Matos 2013-03-08 21:07:10 UTC
Created attachment 238416 [details] [review]
region: Add all widgets at input chooser start

Switching from showing the locale widgets to the filter results or
vice versa turned out to take a noticeable time. This was mainly
caused by removing and adding widgets from EggListBox.

To avoid that we can add all the widgets initially and then filter
according to the mode we are in.
Comment 2 Rui Matos 2013-03-08 21:07:13 UTC
Created attachment 238417 [details] [review]
region: Rate limit the input chooser filtering

Acting on every keystroke makes the UI sluggish given the number of
widgets we have so let's rate limit this to a reasonable frequency
that still feels responsive.
Comment 3 Rui Matos 2013-03-08 21:07:17 UTC
Created attachment 238418 [details] [review]
region: Stop focusing the input chooser entry if already focused

Since doing so selects the entry's text and thus is prone to cause
accidental deletion.
Comment 4 Rui Matos 2013-03-08 21:09:26 UTC
(In reply to comment #3)
> region: Stop focusing the input chooser entry if already focused

This is included here because it only became a problem after the rate limiting patch.
Comment 5 Bastien Nocera 2013-03-12 17:14:50 UTC
Review of attachment 238416 [details] [review]:

I think that this should probably 2 separate pages in a GdStack instead because the code is getting unwieldly.

Furthermore, that would allow us to get transitions from one set of results to the other.
Comment 6 Bastien Nocera 2013-03-12 17:17:00 UTC
Review of attachment 238417 [details] [review]:

Looks fine.

::: panels/region/cc-input-chooser.c
@@ +44,2 @@
 #define MAIN_WINDOW_WIDTH_RATIO 0.60
+#define FILTER_TIMEOUT 150 /* ms */

Maybe using gtk-timeout-initial from GtkSettings is nicer?
Comment 7 Bastien Nocera 2013-03-12 17:17:54 UTC
Review of attachment 238418 [details] [review]:

Looks good.
Comment 8 Rui Matos 2013-05-13 14:38:42 UTC
(In reply to comment #6)
> Review of attachment 238417 [details] [review]:
> 
> Looks fine.
> 
> ::: panels/region/cc-input-chooser.c
> @@ +44,2 @@
>  #define MAIN_WINDOW_WIDTH_RATIO 0.60
> +#define FILTER_TIMEOUT 150 /* ms */
> 
> Maybe using gtk-timeout-initial from GtkSettings is nicer?

Not sure if it makes much sense. That setting is used by gtk+ itself for a timeout to start faking repeats when you press the mouse button in e.g. a GtkSpinButton.

FWIW, gnome-shell also uses an hardcoded 150 ms timeout to trigger searches in the overview.
Comment 9 Rui Matos 2013-05-13 14:56:04 UTC
Filed bug 700229 to add rate limiting support to GtkSearchEntry itself.
Comment 10 Rui Matos 2013-05-13 15:02:23 UTC
Leaving open for the other patch. I'll look into it for 3.10.

Attachment 238417 [details] pushed as 11fdfbf - region: Rate limit the input chooser filtering
Attachment 238418 [details] pushed as 139b810 - region: Stop focusing the input chooser entry if already focused
Comment 11 André Klapper 2021-06-09 16:08:36 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new bug report at
  https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/

Thank you for your understanding and your help.