Kallithea issues archive

Issue #51: Slow page loading up to 100 sec.

Reported by: Nicolai Cebanov
State: resolved
Created on: 2014-10-23 08:13
Updated on: 2015-05-13 21:26

Description

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

Attachments

Comments

Comment by Nicolai Cebanov, on 2014-10-23 09:58

Comment by Andrej Shadura, on 2014-10-23 10:00

Comment by Nicolai Cebanov, on 2014-10-23 12:51

Comment by Mads Kiilerich, on 2014-10-23 12:53

Nicolai, what are you doing? Trying to be rude?

Comment by Mads Kiilerich, on 2014-10-23 12:53

Comment by Andrej Shadura, on 2014-10-23 12:53

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

Comment by Nicolai Cebanov, on 2014-10-23 13:07

Sorry. Analyzed his previous posts, I thought that he could help.

Comment by Christian Oyarzun, on 2014-10-23 14:18

I had a similar issue that ended up being in nodes.py 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 nodes.py does not use pygments to get the mime type by parsing the file.

Comment by Nicolai Cebanov, on 2014-10-24 06:57

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

Comment by Mads Kiilerich, on 2014-10-30 00:41

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

Comment by Christian Oyarzun, on 2014-10-30 03:38

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

Comment by Thomas De Schampheleire, on 2015-05-06 20:01

@kiilerix Do you agree on removing the mime type?

Comment by Mads Kiilerich, on 2015-05-06 21:02

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?

Comment by Christian Oyarzun, on 2015-05-06 21:17

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.

Comment by Thomas De Schampheleire, on 2015-05-12 21:16

Comment by Mads Kiilerich, on 2015-05-13 21:26