Slow page loading up to 100 sec.

Issue #51 resolved
Nicolai Cebanov created an issue

Happens when trying to open folder to list files( ~1700 files in folder) in file tab in repository with ~2000 log history. In the same time when I run "hg serve -p 8000" and open same dir it opens it in 1-2 sec. If I create new repo in kallithea with no hisory and move direcory with 1700 files there it opens it in 3-4 sec. Repository size 500mb. CPU 4cores RAM 8Gb Kallithea-0.1

Comments (16)

  1. Andrej Shadura Account Deactivated

    @nicolai_cebanov, it's not very polite to assign an issue to people unless you know exactly it's something they're responsible for.

  2. Christian Oyarzun

    I had a similar issue that ended up being in when trying to get the mime type of the files. It uses the python mimetypes lib which looks for the apache mime.types file (I use nginx so it wasn't installed by default). Adding apache's mime.types file to one of the knownfiles location fixed the slowness issue. You just need to make sure that the files extension and mime type are in the apache mime types files so does not use pygments to get the mime type by parsing the file.

  3. Nicolai Cebanov reporter

    Thank you, it helped. Added file mime.types to /etc folder, and now opens much quicker in 5-7 sec.

  4. Mads Kiilerich

    Can this be addressed / improved in Kallithea code? Or is it mainly a documentation issue? Either way, a patch would be a great contribution.

  5. Christian Oyarzun

    @kiilerix We could just remove the mime types column from the files list. I'm not sure what having it there adds to the user experience. Bitbucket and GitHub don't show a mime type when listing the files in a repo. I'll submit a patch, if that is the route we would like to take.

  6. Mads Kiilerich

    Yes, I guess it is trivial and kind of pointless ... and error prone. Type detection is still needed for syntax highlighting ... but I guess that uses a different method. The same method could perhaps be used here?

  7. Christian Oyarzun

    I believe all that needs to be done is remove the mime type column from the files_browser.html template. The speed to detect a single file (when it needs to use pygments) is acceptable. The problem is only on the files list where there could be hundreds of files that might need to get parsed only to to display the mime type in a column of the table.

  8. Log in to comment