GNOME Bugzilla – Bug 785309
Avoid creating the keyboard from scratch everytime it's shown
Last modified: 2017-07-23 14:32:03 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.
Created attachment 356225 [details] [review] keyboard: Remove dead code There's no Caribou daemon proxy anymore, no need to shut it down either.
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.
*** Bug 753527 has been marked as a duplicate of this bug. ***
Review of attachment 356225 [details] [review]: Sure
Review of attachment 356226 [details] [review]: Makes sense to me
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