[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim ddf6740 2/2: * pyim-candidates.el (pyim-candidate
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim ddf6740 2/2: * pyim-candidates.el (pyim-candidates-create-quanpin): 优化速度。 |
Date: |
Sun, 5 Dec 2021 21:57:27 -0500 (EST) |
branch: externals/pyim
commit ddf67407c59fe45892eff4ad0aa05604ed29cacf
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* pyim-candidates.el (pyim-candidates-create-quanpin): 优化速度。
---
pyim-candidates.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pyim-candidates.el b/pyim-candidates.el
index 05fb070..e8824ee 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -150,8 +150,13 @@ IMOBJS 获得候选词条。"
;; 更多的词条。
(w4 (unless w3
(mapcar #'char-to-string
- (pyim-zip (pyim-pymap-py2cchar-get
- (car (pyim-codes-create imobj
scheme-name))))))))
+ (pyim-zip
+ (mapcar (lambda (x)
+ ;; NOTE:
这里只取最常用的汉字,太多的汉字会带来后续处理压力,可能拖慢输入法。不过
+ ;; 这个结论只是猜测。
+ (car (split-string x "|")))
+ (pyim-pymap-py2cchar-get
+ (car (pyim-codes-create imobj
scheme-name)))))))))
(push w1 personal-words)
(push w2 common-words)
(push w3 pinyin-chars-1)