Query fewer processes when searching for the parent #841
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This query now happens for more invocation types, so speed it up.
Call
refresh_process()
only on pids numerically close to the oneof delta itself.
Follow-up to #824 (comment):
This now checks the pid range of $delta_pid - 10 / + 20 when looking at the parent and predicted sibling finds nothing.
@infokiller @jebaum @ttys3
Could you apply the patch (3) from #824 (comment) and run
git log -p | time delta
on top of this and see if the slowdown is gone and the calling git process is still found?Also, is this even required on macOS or is querying the entire process structure less expensive there?
And was the slowdown ever observed when delta was configured as the pager in the git config and
git show
(no pipe to delta) was called directly? It really should not, because the parent process should always be found.