Skip to content

parallelize repository incoming check and sync #4103

Open
@vladak

Description

@vladak

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:

for repo in repos:
try:
if repo.incoming():
logger.debug('Repository {} has incoming changes'.
format(repo))
changes_detected = True
break

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions