Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 反馈问题:查询macOS字典的速度较慢 #265

Closed
3 of 4 tasks
kun4399 opened this issue Dec 17, 2023 · 5 comments
Closed
3 of 4 tasks

🐞 反馈问题:查询macOS字典的速度较慢 #265

kun4399 opened this issue Dec 17, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@kun4399
Copy link

kun4399 commented Dec 17, 2023

请先确认以下事项:

  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到 最新版本

问题描述

当macOS字典查询时,有些单词的查询速度明显慢于三指取词。似乎一般是查询结果比较长的那种单词?

重现步骤

用macOS字典查单词

截图

录屏2023-12-17-10 58 06

期望结果

解决查询速度慢的问题

解决方案(可选)

No response

设备型号 && 系统版本

Apple M1 Pro, macOS 14.2

是否愿意提交 PR 解决该问题?

  • 我愿意提交 PR
@kun4399 kun4399 added the bug Something isn't working label Dec 17, 2023
Copy link

Hello kun4399, Thank you for your first issue contribution 🎉

@tisfeng
Copy link
Owner

tisfeng commented Dec 17, 2023

你这个视频看着像 0.5 倍播放速度。。

单词内容多,慢一点是正常的,但一般也不会很慢,大块头词典我用朗文查询单词 take,一般也就 2s 左右。

大块头词典多,查询速度肯定变慢。

https://github.com/tisfeng/Easydict/blob/main/docs/How-to-use-macOS-system-dictionary-in-Easydict-zh.md#%E5%A6%82%E4%BD%95%E6%B7%BB%E5%8A%A0%E7%AC%AC%E4%B8%89%E6%96%B9%E8%AF%8D%E5%85%B8

朗文、柯林斯和牛津,这三本大块头词典都很好,但由于词条内容实在太过丰富,可能会影响 Easydict 查询加载速度,因此建议选择其中一本自己喜欢的就好。

@kun4399 kun4399 closed this as completed Dec 17, 2023
@kun4399 kun4399 reopened this Dec 17, 2023
@kun4399
Copy link
Author

kun4399 commented Dec 17, 2023

嗯嗯,还想问一下, 有没有可能做到像系统查询单词那样的速度, 尤其是在字典比较多的情况下, 三指查词的速度明显快很多。 视频速度确实像是0.8倍速, 我也不知道为什么转换为gif图像后就会变慢

@tisfeng
Copy link
Owner

tisfeng commented Dec 17, 2023

不确定,因为苹果没有提供查词典的官方 API,Easydict 这里用的是私有接口,去查询系统词典的数据,然后还要对数据做各种处理,整过程性能损耗比较严重。

要想优化,感觉有点难。后面有空再看。

@kun4399
Copy link
Author

kun4399 commented Dec 17, 2023

哦哦明白了

@kun4399 kun4399 closed this as completed Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants