I'm running a local Kallithea server in a docker container. When we load the first time in Firefox or Chrome, it takes ages to load. It seems the loading of dependencies hangs on the jQuery or YUI js files. Once the dependencies are cached it loads reasonably fast, as they are cached I guess.
Reloading the page after not having used it some time (days? weeks?), loading takes ages again.
Network speed and the file size of the dependencies are not to blame, as other web applications (Artifactory, Hudson) load swiftly from the same server.
Kallithea uses waitress
to serve its pages. I've tried to enable logging (loglevel = DEBUG
) while running in interactive mode, but don't get any significant output.
The Dockerfile and the run script to reproduce this behaviour are here.
Does anyone know how to solve this and get Kallithea to load as fast as it does on https://kallithea-scm.org/repos/kallithea?
One answer is to serve public
directory using your normal webserver. In general, our leading developer Mads Kiilerich usually recommends not using Paster/Waitress for anything but development, and using a more elaborate WSGI setup instead.
At https://kallithea-scm.org/repos, there's a Lighttpd server in front of Kallithea's Paster/Waitress, which serves static files and proxies everything else to Kallithea. This isn't an optimal setup, but it works better than having Kallithea serve everything.