-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add multiprocessing and author canonicalization #104
base: main
Are you sure you want to change the base?
add multiprocessing and author canonicalization #104
Conversation
@@ -368,7 +507,6 @@ def run(args): | |||
if isinstance(args.gitdir, str): | |||
args.gitdir = [args.gitdir] | |||
# strip `/`, `.git` | |||
gitdirs = [i.rstrip(os.sep) for i in args.gitdir] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nop as detected by pycharm
|
||
for auth, stats in getattr(old, 'iteritems', old.items)(): | ||
i = auth_stats.setdefault(auth2em[auth], | ||
{"loc": 0, "files": set(), "commits": 0, "ctimes": []}) | ||
auth_email = list(auth2em[auth])[0] # TODO: count most used email? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they should all be returned
# if since: | ||
# # Strip boundary messages, | ||
# # preventing user with nearest commit to boundary owning the LOC | ||
# blame_out = RE_BLAME_BOUNDS.sub('', blame_out) | ||
# | ||
# if until: | ||
# # Strip boundary messages, | ||
# # preventing user with nearest commit to boundary owning the LOC | ||
# blame_out = RE_BLAME_BOUNDS.sub('', blame_out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could use some help here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using threads (e.g. concurrent.futures
) instead of processes?
actually ya since the work is being done already by a separate process. I'll work on swapping it over |
time to use those idle CPUs :)
given the majority of the time is spent on the git-blame executable it's nearly linear growth for quite some time. Running on 16 core machine with fast ssd yields pretty tremendous speed increase. I tried being as frugal as possible with communication between the processes.