如何配置 gogs 以快速加载大型 git 存储库?

How can gogs be configured to load large git repositories fast?

我将 gogs on my DigitalOcean virtual machine with 1 cpu, 1GB RAM and a 30GB SSD. It works well with small repositories and everything is snappy. To test how gogs handles larger repositories, I cloned/imported the git 存储库设置为我的 gogs 安装。每次我通过 Web 界面打开存储库时,加载至少需要 5 秒,CPU 使用率徘徊在 95%,内存在 900MB。所以我假设我的虚拟机资源不足。所以我调整了虚拟机的大小并给了它 8 CPU 个内核和 16GB 的 RAM。然而,加载 git 存储库仍然需要大约 5 秒。我的猜测是它要么是配置问题,要么是 gogs 本身及其处理 git 存储库的方式的问题。有没有办法让 gogs 快速处理大型存储库?

这是 gogs 的已知限制。可以跟踪问题 here。 可以通过为 git 存储库数据构建缓存系统来解决此问题。