4806: Parallelize diff generation when SCM is Perforce (or any centralized SCM)


What version are you running?

RBTools 1.0.1

Describe the enhancement and the motivation for it.

Perforce is a client-server SCM system. Each file diff generated by rbt post incurs latency of ~1s, and a single changeset of N files requires N p4 print callouts in serial. So, a change with ~25 files burns ~30s generating diffs.

It'd be great if rbt post, instead of generating diffs serially, perhaps tossed all of the p4 print callouts (or the entire "writing X to tmpfile; p4 print; diff tmpfile $output" sequence) into a threadpool (default size: ncpus?) in order to parallelize this task.

Please provide any additional information below.