- Notifications
You must be signed in to change notification settings - Fork1.8k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been minimized.
This comment has been minimized.
skp236 commentedJul 10, 2025
@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! |
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.
thanks for the investigation and contribution@vojty!
85187e2 intosemantic-release:masterUh oh!
There was an error while loading.Please reload this page.
🎉 This PR is included in version 24.2.7 🎉 The release is available on: Yoursemantic-release bot 📦🚀 |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
🎉 This PR is included in version 25.0.0-beta.4 🎉 The release is available on: Yoursemantic-release bot 📦🚀 |
🎉 This PR is included in version 25.0.0-alpha.6 🎉 The release is available on: Yoursemantic-release bot 📦🚀 |
Uh oh!
There was an error while loading.Please reload this page.
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):
And the example output for this repository:
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