On 16/05/07, Karl Hasselström [off-list ref] wrote:
On 2007-05-15 21:01:43 +0100, Catalin Marinas wrote:
quoted
What is the impact on the bash completion for calling StGIT rather
than reading those files? Is it visible?
Yes, it's visible, but not annoying (to me anyway). The overhead is
akin to the overhead we used to have when "stg help" generated the
command names -- on the order of 100-200 ms, when StGIT is in the
cache. The expensive part is to start stgit; the git calls are cheap.
So theoretically the completion script could duplicate the logic in
StGIT and avoid most of the overhead, if someone wanted it badly
enough.
I did a quick test of 'stg series' with the DAG patches applied, on a
Linux kernel repository ('du -sh .git' is 285M) with 42 patches (only
25 applied). It constantly takes over 2 seconds to complete (compared
to < 200ms without the DAG patches). The problem is that this delay
will happen for bash completion as well.
It seems that most of the time is spent in git._output_lines() called
from stack.read_refs() (for git-show-ref). I attach the profiling
output generated by stg-prof.
--
Catalin