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

Performance regression? #19

Closed
nerdrew opened this issue Mar 29, 2015 · 5 comments
Closed

Performance regression? #19

nerdrew opened this issue Mar 29, 2015 · 5 comments

Comments

@nerdrew
Copy link

nerdrew commented Mar 29, 2015

I updated rust / cargo / flate2 to the most recent versions and un-gzipping a small (165B) file takes multiple seconds. Is it me or did something change?

versions:

% rustc --version
rustc 1.0.0-nightly (199bdcfef 2015-03-26) (built 2015-03-26)
% cargo --version
cargo 0.0.1-pre-nightly (9f265c8 2015-03-25) (built 2015-03-26)

   Compiling miniz-sys v0.1.4
   Compiling flate2 v0.2.1
@alexcrichton
Copy link
Member

Do you have a test case I could profile with? Alternatively, do you have a profile I could look at?

This may also be fixed by rust-lang/rust#23820

@nerdrew
Copy link
Author

nerdrew commented Mar 29, 2015

I don't have a test case right this second, but it is almost certainly the same issue, since I'm using read_to_end

@alexcrichton
Copy link
Member

Ok! closing in favor of that then :)

@nerdrew
Copy link
Author

nerdrew commented Mar 29, 2015

Hmmm. The speed depends on the size of the buffer passed into read_to_end

https://github.com/nerdrew/slow_rust_read_to_end

@alexcrichton
Copy link
Member

Upon profiling it looks like 97% of the runtime is spent in io::Read::read_to_end, so I think that this is definitely rust-lang/rust#23820

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

No branches or pull requests

2 participants