Gogs如何配置为快速加载大型git存储库?
I setup 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 repository to my gogs installation. Everytime I open the repository through the web interface, it takes at least 5 seconds to load and CPU usage hovers at 95% and memory at 900MB. So i assumed my virtual machine resources were insufficient. So I resized the virtual machine and gave it 8 CPU cores and 16GB of RAM. Yet, loading the git repository still takes around 5 seconds. My guess is that it's either a configuration issue or a problem with gogs itself and the way it handles git repositories. Is there a way to get gogs to work fast with large repositories?
我设置了 gogs 在具有1 cpu,1GB RAM和30GB SSD的DigitalOcean虚拟机上。 它适用于小型存储库,并且一切都很快速。 为了测试gogs如何处理更大的存储库,我将 git 存储库克隆/导入到了我的gogs安装中。 每次我通过Web界面打开存储库时,加载至少需要5秒钟,并且CPU使用率徘徊在95%上,而内存则为900MB。 所以我认为我的虚拟机资源不足。 因此,我调整了虚拟机的大小,并为其提供了8个CPU内核和16GB的RAM。 但是,加载git存储库仍需要5秒钟左右。 我的猜测是,这可能是配置问题,也可能是gogs本身及其处理git存储库的方式出现问题。 有没有一种方法可以使gogs在大型存储库中快速工作? p> div>
This is a known limitation of gogs. The issue can be tracked here. This issue can be rectified by building a cache system for git repository data.