The engine needs ~75 ms per key, so above ~13 keys/s every reply came
back after the next key and was dropped as stale, and queued requests
made each reply later still. At 20 keys/s an 18-letter sentence
refreshed the panel once and took 532 ms after the last key to settle.
- Addon: show a reply for an earlier prefix of the pinyin being typed as
a non-selectable preview instead of dropping it.
- Harness: when several B commands are already queued, feed them to the
engine together and fetch candidates once. The merged commands answer
SKIP so replies still pair one-to-one with commands. Without a
backlog each key is still handled immediately.
At 20 keys/s the same sentence now refreshes 10 times and settles
149 ms after the last key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Load the addon when Fcitx starts (OnDemand=False) and start the engine
right away, so the first key never waits for engine startup.
- Restart the engine 200 ms after it exits unexpectedly and replay any
unfinished pinyin, instead of waiting for the next keystroke.
- Send every letter to the engine immediately. The 40 ms debounce that
grouped up to four letters was compensating for the crash above, not
for engine speed.
- Drop the 50 ms sleep between destroying and recreating the session on
reset. The first key right after a commit drops from ~144 ms to ~96 ms.
- Keep commands queued by a restart out of failPendingHandlers. They
used to be failed together with the dead process's handlers, which
turned candidate spans off while the new engine still sent them and
committed text such as "5:你好".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetJavaVM handed the engine an all-zero fake VM instead of the VM
passed to JNI_OnLoad. The engine's env_stat background task calls
GetEnv through it, dereferences a NULL function table and dies with
SIGSEGV. The addon then had to cold-start the engine (~1.5 s) on the
next keystroke, which showed up as a slow first character after a
pause.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fcitx 5 integration for the WeType Android ARM64 input engine, running
through QEMU user mode. The AppImage ships only this project's code plus
redistributable runtime pieces; the official WeType APK is downloaded
from Tencent at install time, verified, and patched locally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>