GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use fast_exit when invoking bash completion to save about 10ms. by stopthatcow · Pull Request #775 · pallets/click

Conversation

@stopthatcow

@stopthatcow stopthatcow commented May 2, 2017

Copy link
Copy Markdown
Contributor

Makes bash completion about 10ms faster by exiting python using os._exit() rather than sys.exit().

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Nicholas Wiles
Use fast_exit when invoking bash completion to save about 10ms.
103c1da
@stopthatcow stopthatcow mentioned this pull request May 2, 2017
Fix bash completion on chained command arguments #771
Closed
@stopthatcow

stopthatcow commented May 2, 2017

Copy link
Copy Markdown
Contributor Author

Some concerns have been raised about testability but I think fast_exit in this specific case is ok because it is only used when bash completion is invoked (something we don't test directly). If we did want to test it we'd just need to launch the test using subprocess. Bzr actually uses this 'trick' in all exit code paths I believe to try to be more responsive as a CLI. I got the inspiration from here

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@untitaker

untitaker commented May 4, 2017

Copy link
Copy Markdown
Contributor

I suppose we can use it as long as we don't actually test anything.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@untitaker
untitaker merged commit 1867ede into pallets:master May 4, 2017
@stopthatcow
stopthatcow deleted the feature/faster_bash_completion branch May 5, 2017 15:17
@davidism davidism added this to the 7.0 milestone Sep 19, 2018
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
@kdeldycke kdeldycke added the shell completion Shell tab completion label Aug 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

shell completion Shell tab completion

Projects

None yet

Milestone

7.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@stopthatcow @untitaker @kdeldycke @davidism
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.