Open emacsbliss opened 2 years ago
Does
curl "https://www.ldoceonline.com/dictionary/successful"
have the same issue?
Since fanyi.el
uses url-retrieve
, it may be suffered from the network jitter
curl seems to return pretty quickly.. wondering would it be rendering issue?
(setq longman-ins (clone fanyi-longman-provider))
(oset longman-ins :word "successful")
(fanyi--spawn longman-ins)
;; Wait until *fanyi* buffer has a longman section which means longman-ins has parsed the result.
;;
;; benchmark the render function.
(benchmark-run 10 (fanyi-render longman-ins))
;;=> (0.150839075 0 0.0)
It costs 0.015s per render on my machine.
PS: switch to *fanyi*
buffer will see 11 sections of longman dict. one is created by fanyi--spawn
.
for some reason certain words takes long time to get the result displayed in buffer..
few examples: