I just ran into similar issues with runtime. My interest is in visualizing only the most recent development cycle for my company's large project, which consisted of approximately 10000 Perforce changelists.
Looking at convert_logs.py
, I saw it was making a direct call to p4 -G changelists
which would dump the entire revision history at considerable cost. p4 changes
takes an argument -m
to limit the number of changelists returned. So I simply edited line 347 of convert_logs.py from
changelists = run_marshal('p4 -G changelists "' + opts.perforce_path + '"')
to
changelists = run_marshal('p4 -G changes -m 10000 "' + opts.perforce_path + '"')
This helped immensely with reducing the runtime.
If anyone is feeling ambitious, I'd suggest refactoring convert_logs to include something like a --perforce-args
option where this and any other options could be specified.