opengrok icon indicating copy to clipboard operation
opengrok copied to clipboard

displaying directory history for Mercurial repository takes way too long

Open vladak opened this issue 3 years ago • 2 comments

Watching the Grafana latencies dashboard for internal production instance I noticed very high (minutes) latencies for some history queries in a Mercurial repository (Solaris ON). Trying it myself I realized that this was caused by the rich options used when getting the history for directories (yes it is still using Mercurial with Python 2.7. Also, directory history is a bit difficult to cache - #1704):

  12138 /usr/bin/python2.7 /usr/bin/hg log -r reverse(0::'default') --template changeset: {rev}:{node|short}\nuser: {author}\ndate: {date|isodate}\ndescription: {desc|strip|obfuscate}\nfiles: {files}\nfile_copie...

while the history for the same repository can be retrieved from command line without any --template in bunch of seconds - still bad but not ugly. The thing is that these {files} and such are important mainly for the indexer. Thanks to this template the UI is able to display the files after clicking on the 'Show modified files' link in the 'Comments' column in the history view for each changeset however it might not be worth it. Maybe the page should be bare (w.r.t. files) and only the link should trigger the heavy lifting.

vladak avatar Feb 16 '22 15:02 vladak

The handling of directory history w.r.t. files in Git should be investigated as well.

vladak avatar Feb 16 '22 15:02 vladak

This is similar to #4023 but not same as it has some Mercurial specifics.

vladak avatar Nov 26 '22 11:11 vladak