Why is --pretty=format: so slow?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For some reason, using --pretty=format:... with git log is much slower
than other formats.  For example, on the kernel tree (on my quad G5):

$ time git log --pretty=oneline >/dev/null

real    0m2.165s
user    0m2.092s
sys     0m0.070s

$ time git log --pretty=raw >/dev/null

real    0m2.426s
user    0m2.358s
sys     0m0.068s

$ time git log --pretty="format:%H" >/dev/null

real    0m7.843s
user    0m6.282s
sys     0m1.557s

$ time git log --pretty="format:%H {%P} %ct" >/dev/null

real    0m7.950s
user    0m6.374s
sys     0m1.573s

Strace seems to indicate that git log is doing at least one sequence
of open, fstat64, fcntl64, getdents64 and close for each line of
output in the --pretty=format: cases, but not in the other cases.
This seems rather unnecessary - could it be fixed?  I'd like to use
the last format listed above with gitk, but not if it is going to make
things 3 times slower.

Paul.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux