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(get-tags.js): bulk get for tags notes#3732

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

Merged
travi merged 4 commits intosemantic-release:masterfromvojty:perf-get-notes
Jul 11, 2025

Conversation

@vojty
Copy link
Contributor

@vojtyvojty commentedMay 19, 2025
edited
Loading

I’ve identified that retrieving tags and their notes is a performance issue, especially in large repositories with hundreds of tags.

The current implementation calls git notes twice (due to backward compatibility for some older semantic-release versions) for each tag, sequentially. Here is the problematic parthttps://github.com/semantic-release/semantic-release/blob/master/lib/branches/get-tags.js#L24

I found out that notes for each tag can be obtained in a single command, which takes only a few milliseconds. Here is the command I used (should cover the older notes refs as well):

git log --tags="*" --decorate-refs="refs/tags/*" --no-walk --format="%d%x09%N" --notes="refs/notes/semantic-release*"

And the example output for this repository:

 (tag: v24.2.5) (tag: v24.2.4) (tag: v24.2.3){"channels":[null]} (tag: v24.2.2){"channels":[null]} (tag: v24.2.1){"channels":[null]} (tag: v24.2.0){"channels":[null]}

The retrieved tags and their notes are fetched all at once (takes only a few ms) and then parsed and converted to a map.

This change shaves off a few minutes from our CI job.

Related#2827,#3689,#3594

ejclark, amine-khemissi, dora1998, and babblebey reacted with heart emoji
@vojtyvojty changed the titlefix(get-tags.js): bulk get for tags notesperf(get-tags.js): bulk get for tags notesMay 19, 2025
@crudo

This comment was marked as spam.

@crudo

This comment was marked as spam.

@travi

This comment was marked as off-topic.

@crudo

This comment has been minimized.

@travitravi mentioned this pull requestJun 6, 2025
@skp236
Copy link

@vojty I’ve tested your PR, and it works like a charm! Previously, it took over 30 minutes to fetch all the tags and create a release — now it completes in just 90 seconds. Huge improvement!

gr2m reacted with heart emoji

@travitravienabled auto-merge (squash)July 11, 2025 19:28
Copy link
Member

@travitravi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

thanks for the investigation and contribution@vojty!

vojty and ejclark reacted with heart emoji
@travitravi merged commit85187e2 intosemantic-release:masterJul 11, 2025
6 checks passed
@github-actions
Copy link

🎉 This PR is included in version 24.2.7 🎉

The release is available on:

Yoursemantic-release bot 📦🚀

@Mhmad2231

This comment was marked as spam.

@Mhmad2231

This comment was marked as spam.

@github-actions
Copy link

🎉 This PR is included in version 25.0.0-beta.4 🎉

The release is available on:

Yoursemantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 25.0.0-alpha.6 🎉

The release is available on:

Yoursemantic-release bot 📦🚀

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@travitravitravi approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@vojty@crudo@travi@skp236@Mhmad2231

[8]ページ先頭

©2009-2025 Movatter.jp