# Goldendict查詞很慢

**URL:** <https://forum.freemdict.com/t/topic/20494>\
**Category:** 软件经验交流展望\
**Created:** [2023 年4 月 13 日 03:19 UTC](https://forum.freemdict.com/t/topic/20494 "2023-04-13T03:19:49Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![rootcao](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@rootcao](https://forum.freemdict.com/u/rootcao)\
**Post date:** [2025 年6 月 15 日 04:33 UTC](https://forum.freemdict.com/t/topic/20494/44 "2025-06-15T04:33:52Z")

</div>

好像快了点，但鼠标还是会转动以下，譬如查get词时

---

<div class="post-metadata">

**Author:** ![rootcao](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@rootcao](https://forum.freemdict.com/u/rootcao)\
**Post date:** [2025 年6 月 15 日 04:35 UTC](https://forum.freemdict.com/t/topic/20494/45 "2025-06-15T04:35:23Z")

</div>

> [@last\_idol](#):
>
> 你看左下角那行字 `43.8 MB resources`，只有把词典分组才能缓解了。

左下角哪里写着 `43.8 MB resources`？  
是字体文件过大导致的慢吗？

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 05:34 UTC](https://forum.freemdict.com/t/topic/20494/46 "2025-06-15T05:34:41Z")

</div>

你的截图是 6.2 MB，字体不算大数量也不多，猜测是 Qt 那边的新浏览器 QtWebEngine 的实现有问题，因为原版本的 GD 用的是旧浏览器，没有类似问题。DictTango 那边也没有类似问题，我多次比较过 DictTango，同一部词典 DicTango 加载所有资源的延迟不会超过 20 ms ，而 GD 这边需要 20-200 ms，而且 GD 加载的资源越多延迟越高，就会出现楼上截图那样 15-20s 的延迟。

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 05:40 UTC](https://forum.freemdict.com/t/topic/20494/47 "2025-06-15T05:40:17Z")

</div>

等我下载 QuteBrowser 看看有没有类似问题，这个浏览器也是用的 QtWebEngine 实现的。

---

<div class="post-metadata">

**Author:** ![rootcao](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@rootcao](https://forum.freemdict.com/u/rootcao)\
**Post date:** [2025 年6 月 15 日 06:35 UTC](https://forum.freemdict.com/t/topic/20494/48 "2025-06-15T06:35:57Z")

</div>

那我用的总共才6.2MB的话，跟你的43.8MB resources比起来算很少了；确实不应该加载慢。这是我用的GD版本

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/4/f/4f3bd033c385272efe428c872348948a10ab0431.png)

---

<div class="post-metadata">

**Author:** ![amob](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/amob/32/14630_2.png) [@amob](https://forum.freemdict.com/u/amob)\
**Post date:** [2025 年6 月 15 日 06:37 UTC](https://forum.freemdict.com/t/topic/20494/49 "2025-06-15T06:37:00Z")

</div>

我20+mb资源（十几部词典加载）就1.5s。

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 06:56 UTC](https://forum.freemdict.com/t/topic/20494/50 "2025-06-15T06:56:38Z")

</div>

> [@last\_idol](#):
>
> 等我下载 QuteBrowser 看看有没有类似问题

我启动闪退，算了。

有想法可以自己试试（只有 Windows 有类似问题：

搜索词头: image

测试用的 500 张图片， mdx+mdd：[mdx.zip](https://forum.freemdict.com/uploads/short-url/vHCbnU9WdV9O6ueyREAclZvSaUM.zip) (292.9 KB)，html: [html.zip](https://forum.freemdict.com/uploads/short-url/5HBeZlU3lJbQKM8xddNkkR1qbsH.zip) (441.4 KB)

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 07:01 UTC](https://forum.freemdict.com/t/topic/20494/52 "2025-06-15T07:01:23Z")

</div>

测试这个要先专注单一问题，看看到底瓶颈在哪。可以用我上面提供的文件试试。

---

<div class="post-metadata">

**Author:** ![rootcao](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@rootcao](https://forum.freemdict.com/u/rootcao)\
**Post date:** [2025 年6 月 15 日 07:10 UTC](https://forum.freemdict.com/t/topic/20494/53 "2025-06-15T07:10:38Z")

</div>

这个怎么验证啊？试过了打开html那个，速度还可以：

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/d/b/dbf5fc504b963b7b00b6d6fb9b62175d783108b6.jpeg)

---

<div class="post-metadata">

**Author:** ![atauzki](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/atauzki/32/1365_2.png) [@atauzki](https://forum.freemdict.com/u/atauzki)\
**Post date:** [2025 年6 月 15 日 07:41 UTC](https://forum.freemdict.com/t/topic/20494/54 "2025-06-15T07:41:36Z")

</div>

windows这字体加载差太多了，在停用缓存和使用同样分组配置的情况下，两个中文字体archlinux 300多ms， win11差不多两秒

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/6/5/6511d7fdd0e9f2ca0867485c9544f18f7c7394df.png)  
 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/b/c/bcd29e81379acc47efc781c175c4a9e949b9fec8.png)

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 08:15 UTC](https://forum.freemdict.com/t/topic/20494/55 "2025-06-15T08:15:35Z")

</div>

> [@last\_idol](#):
>
> 搜索词头: image
> 
> 测试用的 500 张图片， mdx+mdd：[mdx.zip](https://forum.freemdict.com/uploads/short-url/vHCbnU9WdV9O6ueyREAclZvSaUM.zip) (292.9 KB)，html: [html.zip](https://forum.freemdict.com/uploads/short-url/5HBeZlU3lJbQKM8xddNkkR1qbsH.zip) (441.4 KB)

用 NG 加载这个 mdx 试试，看看速度快不快。

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 08:17 UTC](https://forum.freemdict.com/t/topic/20494/56 "2025-06-15T08:17:21Z")

</div>

我感觉是Windows 上的 QtWebEngine 有问题，Qt 那边论坛有人反馈类似问题，看到的回复都说没有复现之类的。。

---

<div class="post-metadata">

**Author:** ![amob](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/amob/32/14630_2.png) [@amob](https://forum.freemdict.com/u/amob)\
**Post date:** [2025 年6 月 15 日 08:18 UTC](https://forum.freemdict.com/t/topic/20494/57 "2025-06-15T08:18:21Z")

</div>

他这情况不正常，我塞了一百多部词典一起查，273MB资源加载才27秒，等待加载的过程也不影响查看词典。他40mb加载4.3分钟。Goldendict-ng真是越来越快了，以前我用感觉挺卡的。

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/2/8/287ddb7b4d31ab4c8c070847f8e0e6b05630b8a9.png)

字体加载确实挺影响速度

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/b/7/b7b3939712ea851f89b5ad7c525ee8da97ddf5d8.png)

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 08:24 UTC](https://forum.freemdict.com/t/topic/20494/58 "2025-06-15T08:24:19Z")

</div>

图片不影响，字体影响？

---

<div class="post-metadata">

**Author:** ![rootcao](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@rootcao](https://forum.freemdict.com/u/rootcao)\
**Post date:** [2025 年6 月 15 日 10:09 UTC](https://forum.freemdict.com/t/topic/20494/59 "2025-06-15T10:09:57Z")

</div>

搜"image"时，鼠标一样会短暂转为loading的图标:

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/9/6/9697adf516f85bde28f9ba0fd751fdfab81ec02a.png)

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 11:23 UTC](https://forum.freemdict.com/t/topic/20494/60 "2025-06-15T11:23:35Z")

</div>

500 张图片，平均 350ms 的延迟，没有增加很多，说明主要是字体的问题，#41 楼截图里 400KB 的字体需要 2.29 秒，这个时间很不正常。

---

<div class="post-metadata">

**Author:** ![rootcao](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@rootcao](https://forum.freemdict.com/u/rootcao)\
**Post date:** [2025 年6 月 15 日 12:10 UTC](https://forum.freemdict.com/t/topic/20494/61 "2025-06-15T12:10:49Z")

</div>

真的是奇了怪了。amob跟我用的朗文词典排版跟字体应该都是同一个，却比我快。我把那个字体mdd解开了把字体文件放到跟朗文词典mdx文件同级别也还是会加载慢：

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/4/0/400acd44e0deecae868d5ae947167612a2dcf431.png)

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 12:51 UTC](https://forum.freemdict.com/t/topic/20494/64 "2025-06-15T12:51:14Z")

</div>

猜测是词典里的浏览器加载字体有问题，和词典文件放在哪里没关系。

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年6 月 15 日 13:04 UTC](https://forum.freemdict.com/t/topic/20494/65 "2025-06-15T13:04:03Z")

</div>

新的 `mdx.zip` 解压后的词典文件里包含 500 张图片，每张 750KB 大小，总共 375 MB，用于测试词典软件的加载速度。（搜索词头：image

[mdx.zip](https://forum.freemdict.com/uploads/short-url/h2adftsXppWgc48I4pxALKg4ZRP.zip) (3.5 MB)

`html.zip` 包含生成图片的脚本，这里备份下方便以后测试直接使用。  
[html.zip](https://forum.freemdict.com/uploads/short-url/6WeP2UsjEU7IXguFvO2tZCHM5ax.zip) (7.6 MB)

---

<div class="post-metadata">

**Author:** ![rootcao](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@rootcao](https://forum.freemdict.com/u/rootcao)\
**Post date:** [2025 年6 月 15 日 13:30 UTC](https://forum.freemdict.com/t/topic/20494/66 "2025-06-15T13:30:04Z")

</div>

> [@anon69319103](#):
>
> 户能做的都做了，剩下是系统、软件开发者协调的问

我没加the free dictionary idioms词典之前，加载速度是可以的；没想到加了之后，总体变慢了。还是想保留这个LDOCE++版本的，那只能按您建议的重新打包 mdd（去掉字体文件、字体 base64数据）了。

那个字体mdd是amob用来配合他写的css用的，就是说我只需要删掉那个字体mdd，去掉css中导入本地字体的命令，和把要用的字体安装到系统里就可以了是吗？

[上一页](https://forum.freemdict.com/t/topic/20494.md?page=2)

[下一页](https://forum.freemdict.com/t/topic/20494.md?page=4)
