It turns out that guess_repo is already cached in the two places it's called, and I didn't want to hard-code tool-names to identify SCM apps (we probably need some way to identify "types" of tools).
However, guess_repo shouldn't have been being called at all, so I fixed that (missing call to set_context) so it should be much faster now.
To test, view any SCM tree with stats logging enabled (1) and see that guess_repo no longer shows up in the stats.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
allura:cj/5978
It turns out that
guess_repo
is already cached in the two places it's called, and I didn't want to hard-code tool-names to identify SCM apps (we probably need some way to identify "types" of tools).However,
guess_repo
shouldn't have been being called at all, so I fixed that (missing call toset_context
) so it should be much faster now.To test, view any SCM tree with stats logging enabled (1) and see that
guess_repo
no longer shows up in the stats.Couldn't duplicate guess_repo being called on a tree view, but it is called a lot on a log view.
Fix for History view and logging any other calls pushed.