Skip to content
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

improve performance of require-jira-issue.sh #242

Open
wants to merge 1 commit into
base: master
from

Conversation

@time4tea
Copy link

time4tea commented May 28, 2019

If you have a repo with a lot of activity, a branch can quickly fall behind. After a certain number of commits (about 1000) the shell loop will be too slow to run in the 5s timeout, so its not possible to merge from upstream branch intoyour own branch and push it.

Using a delimiter in the git log, and then awk means all the commits can be considered by a single command pipeline.

1000 commits timing:
previous: 5.32s (too much)
new: 0.052s (quick enough)

also... handle case of new repository.

replace shell loop with awk for 100x performance improvement
@time4tea
Copy link
Author

time4tea commented Jul 10, 2019

@larsxschneider - any interest in this?

@larsxschneider
Copy link
Member

larsxschneider commented Jul 17, 2019

Thanks @time4tea ! That's a smart way to tackle the problem 👍 🎉 😊

I am busy for the next two weeks but I'll integrate your changes afterwards!

@gpadmesh
Copy link

gpadmesh commented Aug 28, 2019

+1

@primetheus primetheus requested review from larsxschneider and primetheus Dec 6, 2019
@jonico
jonico approved these changes Mar 20, 2020
@jonico
Copy link
Contributor

jonico commented Mar 20, 2020

@time4tea: I approved your change if it was possible for you to rework your change that it fits with the latest changes in master and the JIRA REGEXP could be parametrized

@time4tea
Copy link
Author

time4tea commented Mar 20, 2020

Sorry I am too busy to change this, but please do feel free to change as you see fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.