优化 WeaselTSF:跳过重复的候选窗位置更新#1885
Open
dragonknightk wants to merge 1 commit into
Open
Conversation
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.
摘要
WeaselTSF侧缓存上一次候选窗/组字位置。WeaselIPC侧缓存上一次压缩后的输入位置消息。背景
快速输入时,候选窗位置更新链路会出现大量“实际位置未变化”的重复调用。本地测试样本中:
85%。82%。这些重复更新会继续进入 IPC 和候选窗更新链路,即使候选窗实际位置没有变化。本 PR 只在 TSF/IPC 边界过滤等价的位置更新,用来减少无意义的消息和窗口更新压力。
改动边界
与已有 PR 的关系
与 #1869 都属于候选窗性能方向,但处理层级不同:#1869 更靠近 UI 层,本 PR 在 TSF/IPC 边界减少重复位置消息。
测试
clang-format --style=file --Werror --dry-run。xmake f -a x64 -m release && xmake。WeaselTSF和WeaselIPC相关代码路径可编译。