Turns out p4 filelog is garbage, so instead iterate each CL from the p4 annotate result and use p4 change -o. Results from p4 change -o are stored in a map for retrieval on later lines. The map defined as a field for the instance in order to speed up analysis on subsequent files in case a CL spanned multiple files.
In order to get p4 filelog -i to list all possible changelists, it has to be run twice, once with -h and once without. Analysis for 300 files took ~7min using that method, vs ~3.5min when using p4 change -o for each CL. For 600 files, ~15.5min vs ~7.5min. I haven't done any other performance comparisons.
See https://github.com/SonarSource/sonar-scm-perforce/pull/7
Turns out
p4 filelog
is garbage, so instead iterate each CL from thep4 annotate
result and usep4 change -o
. Results fromp4 change -o
are stored in a map for retrieval on later lines. The map defined as a field for the instance in order to speed up analysis on subsequent files in case a CL spanned multiple files.In order to get
p4 filelog -i
to list all possible changelists, it has to be run twice, once with-h
and once without. Analysis for 300 files took ~7min using that method, vs ~3.5min when usingp4 change -o
for each CL. For 600 files, ~15.5min vs ~7.5min. I haven't done any other performance comparisons.