Skip to content

bug(ios): app hanging for more than 2000ms during system-keyboard startup #12218

Description

@jahorton

Describe the bug

Relates to #1492.

We have quite a number of Sentry reports in which our iOS system keyboard is terminated due to taking too long to initialize. This termination tends to happen in a number of places within the code; after all, it's a externally-based time-triggered termination.

Good point-of-reference report: https://keyman.sentry.io/issues/5518064391/events/ca1f3a0ca13e4c0fb3f3408a3aa9e821/

As can be seen from the linked report above, we sometimes have repeated page-reloading occurring as the system-keyboard is starting up. Using the same Breadcrumbs section -> View All pattern, we can see a number of reloads all triggered within the span of two seconds.

  • Earliest visible "Keyboard loaded" breadcrumb: 03:37:10.476
  • Last one: 03:37:12.502
  • Count: 8 (!)

That's eight times that the function below - which triggers when the keyboard host-page finishes loading - was triggered within the span of two seconds:

extension KeymanWebViewController: KeymanWebDelegate {
func keyboardLoaded(_ keymanWeb: KeymanWebViewController) {
delegate?.keyboardLoaded(keymanWeb)
isLoading = false
let message = "Loaded keyboard."
os_log("%{public}s", log: KeymanEngineLogger.engine, type: .info, message)
SentryManager.breadcrumb(message, sentryLevel: .debug)

The report above in particular is interesting for an extra reason - it fits a pattern for some of the "overused RAM" reports and even includes a "low memory" event notification in its logs.


Note: not all cases are during the initial load. This one has the same report title, but it's triggered at a distinctly different point within the keyboard lifecycle: https://keyman.sentry.io/issues/5368749989/events/24c32ecb945d4932bc6ecc8451ba6fb2/

Reproduce the bug

No response

Expected behavior

No response

Related issues

No response

Keyman apps

  • Keyman for Android
  • Keyman for iPhone and iPad
  • Keyman for Linux
  • Keyman for macOS
  • Keyman for Windows
  • Keyman Developer
  • KeymanWeb
  • Other - give details at bottom of form

Keyman version

No response

Operating system

No response

Device

No response

Target application

No response

Browser

No response

Keyboard name

No response

Keyboard version

No response

Language name

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions