Open jahorton opened 3 months ago
Regarding the multi-reload...
There's a chance that this is related, though its usage seems to be restricted to an operation that should be one-time - I believe it was originally added to detect 'blank keyboard' states we ran into in the past (when loading the keyboard after it was backgrounded) + do a one-time reload to work around them.
Sentry Issue: KEYMAN-MAC-JA
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.
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:
https://github.com/keymanapp/keyman/blob/402b1964f2c654496b555ceddc858b3d19fc911e/ios/engine/KMEI/KeymanEngine/Classes/Keyboard/KeymanWebViewController.swift#L593-L600
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 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