Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upimprove performance of require-jira-issue.sh #242
+19
−12
Conversation
replace shell loop with awk for 100x performance improvement
|
@larsxschneider - any interest in this? |
|
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
commented
Aug 28, 2019
|
+1 |
|
@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 |
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
time4tea commentedMay 28, 2019
•
edited
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.