Description
Observing a opengrok-mirror
run for a bunch of non-local Mercurial repositories, with the -I
option, I noticed that each repository takes couple of seconds to check (via repo.incoming()
). Since the list of repositories is known beforehand in utils/mirror.py#process_changes()
, this piece of code could be parallelized:
opengrok/tools/src/main/python/opengrok_tools/utils/mirror.py
Lines 324 to 330 in c101828
The top-level repo check needs some thought, though. Also, will need to take care of error reporting. There is no exception (re)thrown, however will need to make sure that errors are properly returned as FAILURE_EXITVAL
.
Lastly, will need to determine the parallelism level.
Similarly, same should be done for the repository synchronization part.