]> git.eshelyaron.com Git - emacs.git/commit
Optimize skkdic conversion (Bug#28043)
authorNoam Postavsky <npostavs@gmail.com>
Sun, 2 Jul 2017 02:39:16 +0000 (22:39 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Tue, 22 Aug 2017 00:52:25 +0000 (20:52 -0400)
commit9d7973530f912c6001445ba9b83b7893b466aee8
tree4581c401602c8def0331858ff9ef16122b00229d
parentba0bb332dd841274208f71e0739e0c5e5d231d7a
Optimize skkdic conversion (Bug#28043)

The primary speedup comes from the optimizing lookup-nested-alist and
set-nested-alist for the case where the key is a string.  This brings
the time down to less than half the original.

* lisp/international/mule-util.el (lookup-nested-alist)
(set-nested-alist): Use `assq' instead of `assoc' when KEYSEQ is a
string.

* lisp/international/ja-dic-cnv.el (skkdic-collect-okuri-nasi)
(skkdic-convert-okuri-nasi): Use progress-reporter functions instead
of calculating ratio of work done inline.

(skkdic-reduced-candidates): Call `char-category-set' on the first
character of the string directly, instead of using a regexp for the
character category.
(skkdic--japanese-category-set): New constant.
(skkdic-collect-okuri-nasi): Just set
`skkdic-okuri-nasi-entries-count' at once at the end rather than
updating it throughout the loop.

(skkdic-convert-postfix skkdic-convert-prefix)
skkdic-get-candidate-list, skkdic-collect-okuri-nasi)
(skkdic-extract-conversion-data): Use `match-string-no-properties'
instead of `match-string'.
lisp/international/ja-dic-cnv.el
lisp/international/mule-util.el