# Discourse 在专用服务器上加载缓慢

**URL:** https://meta.discourse.org/t/discourse-slow-loading-on-dedicated-server/301122
**Category:** Support
**Created:** [2024年三月27日 09:24 UTC](https://meta.discourse.org/t/discourse-slow-loading-on-dedicated-server/301122 "2024-03-27T09:24:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![P\_O](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/p_o/32/343333_2.png) [@P\_O](https://meta.discourse.org/u/P_O)
#### Post date: [2024年三月27日 09:24 UTC](https://meta.discourse.org/t/discourse-slow-loading-on-dedicated-server/301122/1 "2024-03-27T09:24:39Z")

</div>

我在专用服务器上安装了 Discourse，当索引页设置为加载最新帖子时，加载速度非常慢。服务器是完全托管的，几乎没有运行任何东西，它上面的其他网站加载速度都很快。

这是使用“分类/热门帖子”作为索引页面的 Matomo 页面性能指标：

19/3/24 2.66 秒 总加载时间  
20/3/24 1.66 秒  
21/3/24 3.88 秒  
22/3/24 1.85 秒  
23/3/24 1.48 秒

现在切换到“最新帖子”索引页面：  
24/3/24 17.92 秒 总加载时间  
平均 DOM 处理时间 5.55 秒  
平均 DOM 完成时间 11.81 秒

25/3/24 5.62 秒  
平均 DOM 处理时间 1.91 秒  
平均 DOM 完成时间 3.21 秒

26/3/24 13.94 秒  
平均 DOM 处理时间 2.33 秒  
平均 DOM 完成时间 9.94 秒

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2024年三月27日 09:36 UTC](https://meta.discourse.org/t/discourse-slow-loading-on-dedicated-server/301122/2 "2024-03-27T09:36:03Z")

</div>

这里有一些关于页面加载主题的精彩讨论：

> [@Discourse Loading Time](https://meta.discourse.org/t/discourse-loading-time/89914/4?u=merefield):
>
> Nature of the beast; we are a JavaScript application, so the app has to be delivered to the browser. It is a bit like if you were measuring smartphone app startup times, including the time spent to download and install the app from the app store as part of the “startup” time. What isn’t shown is that subsequent page loads are blindingly fast in Discourse because the app is loaded in the browser, and we only send API calls and json (the data necessary to render the page) down the wire.

同样的情况仍然适用。这是一个基于 JavaScript 的应用程序。不过，自那时以来已经有一些创新。

Google 抓取看不到 JavaScript 的速度。
