perf(t9): 九键快速输入长序列性能优化——wordgraph 双向增量缓存 + 插入式快通道 - #739
Open
minilulubai wants to merge 1 commit into
Open
Conversation
解决九键快速输入长数字序列时预编辑与候选列表无法实时同步刷新(单键 438-459ms)的问题。 - T9InputController: 数字键 flush 合帧,跳过非队尾帧的全量 compose - t9_script_translator(新): 复刻 ScriptTranslation,wordgraph 跨键双向增量缓存 (追加/退格都复用词条快照,首键冷启动全量),修复 poet_ 空指针与 user_phrase_iter_ 初始化错误 - t9_patch_utils: 插入式两条 patch 接入(@after 1 + 哨兵 tag),不覆盖 translators 列表,防双计算 - t9_processor: 左栏拼音模式判定兼容新组件名 - rime_jni: 快通道 patch 管线 + readCurrentState/getComposition 逐候选日志精简
Contributor
Author
|
@kingzcheung 请暂时不要合入它,目前问题:每次按键输入时不是像全键盘全量构建,采用 wordgraph 增量缓存不能保证正确性,会出现这样预编辑文本出现数字的情况,正向:就是性能确实明显提升。还在找新的解决方案。简拼引入满足输入需求,但是让性能优化陡增。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@kingzcheung 目前九键快速输入长序列时会出现明显卡顿,特别是开启了简拼(
- abbrev/^([a-z]).*/$1/- abbrev/^([A-Z]).*/$1/), 本轮旨在解决此问题,具体方案描述见关联issue中方案描述,请协助审阅,目前实现,绝大部分都在librime-t9中。已跟进了主线变动。概述
解决九键快速输入长数字序列时预编辑与候选列表无法实时同步刷新(部分输入序列测试: 单键 438-459ms)的问题。
script_translator,但防止防它与:t9_script_translator重复计算关联 Issue
Closes #677
改动类型
自测清单
./gradlew test并通过备注
目前在不修改librime源码前提下,仅能通过在librime-t9中去优化,后续将继续探索优化:
librime中:dict.Lookup、Poet,以应对简拼开启后性能波动,或者找寻找新的简拼打开方式。