Issue 185: 关于拼音输入法实现方式的一个建议
http://code.google.com/p/ibus/issues/detail?id=185
New issue report by hubertstar:
在当前的拼音输入法中,使用了sqlite作为词库引擎。
虽然它是c写的,效率也没有问题,但是不能否认的时候在高io操作的时候输入法打开
非常缓慢。
这也就是为什么总有人抱怨scim-python和ibus-pinyin缓慢的原因。
因为在运行时,核心框架、输入法界面和配置都是在内存里面,而且python编译后形
成的二进制速度应该慢不到哪去。
而重要的词库,是通过sqlite存取的。
我不知道现在系统里面对于词库有没有内存缓存。
如果能够优化词库的内存缓存策略,就算匹配算法不用改进,我认为效率还是能上一
个台阶的。
其一:减小首次匹配的查找范围,也就是说在刚打字匹配的词语上范围尽可能窄,界
面即时相应速度会加快。而用户翻页时稍微慢一点倒不是问题。
其二:尽量使用基于内存的数据匹配,减少使用sqlite的频率。
其三:对于算法上开一个头脑风暴,做到拼音输入的性能与功能最优化。
Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en
-~----------~----~----~----~------~----~------~--~---