diff options
author | Sylvain <sylvain.desodt@gmail.com> | 2023-08-19 23:21:49 +0200 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-09-10 19:24:56 +0000 |
commit | 25d6c7cc108bea4c81e124623bcf7f4b6832a914 (patch) | |
tree | 35fe26972cbeda47f37261ac8140eba8d03fa2fd /project.py | |
parent | f19b310f15e03e92075e7409c9d7f0956acc007d (diff) | |
download | git-repo-25d6c7cc108bea4c81e124623bcf7f4b6832a914.tar.gz |
manifest_xml: use a set instead of (sorted) list in projectsDiff
The logic in projectsDiff performs various operations which
suggest that a set is more appropriate than a list:
- membership lookup ("in")
- removal
Also, sorting can be performed on the the remaining elements at the
end (which will usually involve a much smaller number of elements).
(The performance gain is invisible in comparison to the time being
spent performing git operations).
Cosmetic chance:
- the definition of 'fromProj' is moved to be used in more places
- the values in diff["added"] are added with a single call to extend
Change-Id: I5ed22ba73b50650ca2d3a49a1ae81f02be3b3055
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383434
Tested-by: Sylvain Desodt <sylvain.desodt@gmail.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Sylvain Desodt <sylvain.desodt@gmail.com>
Diffstat (limited to 'project.py')
0 files changed, 0 insertions, 0 deletions