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

Improves performance of prompt filtering #438

Merged
merged 2 commits into from
Mar 22, 2015

Conversation

vladimir-kotikov
Copy link
Contributor

This PR dramatically improves performance of promp filtering for git and mercurial by using custom logic to pre-check if process calls is necessary. The overal clink.prompt_filter execution time is decreased from ~600 ms to:

  • ~10 ms in non-repo directory
  • ~130 ms for git repos
  • ~350 ms for hg repos

This implements custom logic to detect if we're inside of working tree
and skips os calls if not. This will improve performance of prompt
handling, especially for mercurial prompt.
When `get_git_status` fails the inner `os.execute` call print error
message to console. This removes all error messages fro such cases.
MartiUK added a commit that referenced this pull request Mar 22, 2015
Improves performance of prompt filtering
@MartiUK MartiUK merged commit 2292348 into cmderdev:development Mar 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants