Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(cmd): Use buffered reads#389

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:masterfromcsnover:csnover-buffer-reads
Feb 25, 2016
Merged

fix(cmd): Use buffered reads#389

Byron merged 1 commit intogitpython-developers:masterfromcsnover:csnover-buffer-reads
Feb 25, 2016

Conversation

csnover
Copy link
Contributor

Popen in many versions of Python (possibly all versions prior to 3.3.1?) defaults to using unbuffered reads (bufsize=0), which areextremely slow. When reading a 160k-line file from git, unbuffered reads take 5.75s; buffered reads take 0.23s.

Newer versions of Python 3 appear to change the default to bufsize=-1 so this may only be a problem for a subset of users, but it certainly was a problem for me. I’m not sure of any reason not to just use buffered reads by default for everyone, so I am submitting this patch for evaluation. Thanks!

Popen defaults to using unbuffered reads, which are extremely slow.
@Byron
Copy link
Member

Thanks for bringing this up ! Even though I might have had the hunch that parsing git command output is a bit slow, it never struck me as being due to disabled buffering - apparently I wanted to believe it's just due to python.
Thus I am happily merging this awesome fix.

@ByronByron added this to thev1.0.3 - Fixes milestoneFeb 25, 2016
Byron added a commit that referenced this pull requestFeb 25, 2016
@ByronByron merged commit0f4d5ce intogitpython-developers:masterFeb 25, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
@csnover@Byron

[8]ページ先頭

©2009-2025 Movatter.jp