fanyi.el
fanyi.el copied to clipboard
Too slow
Thanks for this great extension!
I tried fanyi
, youdao-dictionary
and go-translate
, and looks fanyi
is the slowest. It's better if fanyi
can return the results faster.
The fanyi
buffer is beautiful. However, I haven't used this package for quite a long while because of its slowness. I have similar keybindings for fanyi
and youdao-dictionary
. Sometimes I call fanyi
by chance. It can take more than 5 seconds to get the results. I profiled Emacs when I used fanyi
. But I don't have a clue to what might be wrong.
167 39% - ...
166 39% Automatic GC
1 0% + url-http-create-request
93 21% - #<compiled 0x188053a5ecc0f91b>
93 21% - url-retrieve
93 21% - url-retrieve-internal
91 21% - url-https
91 21% - url-http
91 21% - url-http-find-free-connection
91 21% - url-open-stream
91 21% - open-network-stream
91 21% - network-stream-open-tls
91 21% - open-gnutls-stream
2 0% - gnutls-boot-parameters
2 0% + gnutls-trustfiles
1 0% + url-generic-parse-url
54 12% + redisplay_internal (C function)
42 9% + command-execute
29 6% + url-http-generic-filter
13 3% + evil-escape-pre-command-hook
12 2% + timer-event-handler
4 0% + substitute-command-keys
4 0% + nsm-verify-connection
2 0% + eldoc-pre-command-refresh-echo-area
1 0% mode-local-post-major-mode-change
1 0% + undo-auto--add-boundary
1 0% + flycheck-handle-signal
See #19 for a quick profile. I will then update README to mention how to profile fanyi.el
.
I don't think the troubleshooting mentioned in #19 is helpful. I'd suggest to experience both fanyi
and go-translate
/youdao-dictionary
.
go-translate
/youdao-dictionary
looks pretty fast!
But go-translate
/youdao-dictionary
directly uses the translation API, fewer texts are transferred than fetching the entire html pages that fanyi.el
does. It needs to do some investigations, the detailed reason will be posted here later.