Skip to content

Use BufferedReader in get_readable_fileobj - #8634

Closed
pllim wants to merge 1 commit into
astropy:masterfrom
pllim:bufferedreader
Closed

pllim wants to merge 1 commit into
astropy:masterfrom
pllim:bufferedreader

Conversation

@pllim

@pllim pllim commented Apr 24, 2019

Copy link
Copy Markdown
Member

Address utils portion of #6652 . Close #7981.

@bsipocz

bsipocz commented Apr 24, 2019

Copy link
Copy Markdown
Member

@pllim - any reason for this to wait for 4.0?

@saimn

saimn commented Apr 24, 2019

Copy link
Copy Markdown
Contributor

I don't think there is a gain in doing this. The idea of using BufferedReader (as I interpret it from the comment) is to avoid reading the full buffer if it is not needed. But as soon as BytesIO is used with a .read(), the buffer is read and we can continue directly with BytesIO.
So at first I think that we need to find in which case the change would be useful, and then we can decide if the additional complexity introduced by #7981 is worth it or not.

@pllim pllim closed this Apr 24, 2019
@pllim
pllim deleted the bufferedreader branch April 24, 2019 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants