Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

perf: improve git history processing for changelog generation#972

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@codejedi365
Copy link
Contributor

@codejedi365codejedi365 commentedJul 5, 2024
edited
Loading

Purpose

  • Improve performance of PSR when working on large git repositories
  • Prevent ordering issues that arise from automated commit messages within milliseconds

Rationale

Refactoring comparison data into a lookup datastructure allows forO(1) time lookups rather thanO(n) searches on repositories with lots of tags.

How I tested

Manually through the evaluation of logs, where many logs were not printed and it was noticable the number of iterations in the loops. I did not do a benchmark datapoint though.

How to verify

Run on PSR itself as it has enough tags to cause a slowdown and many irrelevant log entries.

semantic-release changelog

@codejedi365codejedi365 self-assigned thisJul 5, 2024
@codejedi365codejedi365force-pushed theperf/git-history-processing branch 4 times, most recently from012f1c8 to3c53bacCompareJuly 6, 2024 20:54
This converts the double for-loop (`O(n^2)`) down to `O(n)` using alookup table to match the current commit with a known tag rather thaniterating through all the tags of the repository every time.
@codejedi365codejedi365force-pushed theperf/git-history-processing branch from3c53bac to1029bbbCompareJuly 6, 2024 20:58
@codejedi365codejedi365 merged commitbfda159 intopython-semantic-release:masterJul 6, 2024
@codejedi365codejedi365 deleted the perf/git-history-processing branchJuly 6, 2024 21:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@codejedi365codejedi365

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@codejedi365

[8]ページ先頭

©2009-2025 Movatter.jp