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

Glide's BufferedInputStream grows to the size of the image #225

Closed
sjudd opened this issue Oct 30, 2014 · 1 comment
Closed

Glide's BufferedInputStream grows to the size of the image #225

sjudd opened this issue Oct 30, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@sjudd
Copy link
Collaborator

sjudd commented Oct 30, 2014

Glide uses a forked BufferedInputStream which allows it's buffer to expand to make sure that we don't throw when images have huge headers (happens occasionally). However, after we read the image header and reset, we don't do anything to indicate that the buffer no longer needs to grow, so it expands to fit the entire image while we're decoding, resulting in unnecessary allocations and copies.

@sjudd sjudd added the bug label Oct 30, 2014
@sjudd sjudd added this to the 3.4 milestone Oct 30, 2014
@sjudd sjudd closed this as completed in deef4ae Oct 30, 2014
sjudd added a commit to sjudd/glide that referenced this issue Nov 3, 2014
@sjudd sjudd reopened this Nov 3, 2014
@sjudd
Copy link
Collaborator Author

sjudd commented Nov 3, 2014

Fix caused #231.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant