Search code examples
gitgogogs

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


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?


Solution

  • 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.