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 785309 - Avoid creating the keyboard from scratch everytime it's shown
Avoid creating the keyboard from scratch everytime it's shown
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: keyboard
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 753527 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-07-23 12:11 UTC by Carlos Garnacho
Modified: 2017-07-23 14:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Remove dead code (1.41 KB, patch)
2017-07-23 12:12 UTC, Carlos Garnacho
committed Details | Review
keyboard: Only rebuild keyboard actor on keyboard type changes (3.17 KB, patch)
2017-07-23 12:12 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2017-07-23 12:11:13 UTC
The time it takes to show the OSK was greatly improved by the patches in bug #777342 (because of no sync dbus call to startup the Caribou daemon), However the delay is still noticeable, and exacerbated when users try to simultaneously use the touchscreen in conjunction with other input devices.

It seems most of this slowdown comes from recreating Keyboard instance and the full actor hierarchy each time it's shown. IMO redoing the keyboard is actually unneeded on most situations, synchronizing only visibility in this case takes the slowdown away (except of course the first time the keyboard needs to be created).

I'm attaching a couple of patches doing that.
Comment 1 Carlos Garnacho 2017-07-23 12:12:34 UTC
Created attachment 356225 [details] [review]
keyboard: Remove dead code

There's no Caribou daemon proxy anymore, no need to shut it down either.
Comment 2 Carlos Garnacho 2017-07-23 12:12:40 UTC
Created attachment 356226 [details] [review]
keyboard: Only rebuild keyboard actor on keyboard type changes

About every other situation can do with synchronizing keyboard visibility,
and keyboard layout changes are already handled internally in the Keyboard
object.

A downside of this approach is that once created, there will always be a
Keyboard instance and its full actor hierarchy. Seems reasonable to do that
since we can't tell it won't ever be needed.
Comment 3 Carlos Garnacho 2017-07-23 12:20:24 UTC
*** Bug 753527 has been marked as a duplicate of this bug. ***
Comment 4 Florian Müllner 2017-07-23 12:31:51 UTC
Review of attachment 356225 [details] [review]:

Sure
Comment 5 Florian Müllner 2017-07-23 12:31:54 UTC
Review of attachment 356226 [details] [review]:

Makes sense to me
Comment 6 Carlos Garnacho 2017-07-23 14:31:53 UTC
Thanks! Pushed to master.

Attachment 356225 [details] pushed as 775d77b - keyboard: Remove dead code
Attachment 356226 [details] pushed as 08ad345 - keyboard: Only rebuild keyboard actor on keyboard type changes