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

Let windows Perl programs call setvbuf on file handles #15257

Open
p5pRT opened this issue Mar 31, 2016 · 3 comments
Open

Let windows Perl programs call setvbuf on file handles #15257

p5pRT opened this issue Mar 31, 2016 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 31, 2016

Migrated from rt.perl.org#127805 (status was 'new')

Searchable as RT127805$

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2016

From spam-bitcard@yary.ack.org

An infrequently asked Perl5 question is how to adjust the read-ahead buffer for normal reads. Example discussions on the web include

http​://stackoverflow.com/questions/1251062/how-can-i-set-the-file-read-buffer-size-in-perl-to-optimize-it-for-large-files

http​://perlmonks.org/?node_id=692348 "4k read buffer is too small"

The best-documented answer these days is setvbuf as mentioned in the IO​::Handle docs. However​: "IO​::Handle​::setvbuf() is not available by default on Perls 5.8.0 and later" and indeed that's the case- it doesn't seem to be available on my Strawberry Perl 5.22, even if I open a handle with the "​:stdio" layer.

Being able to adjust a filehandle's read-ahead buffer size is occasionally useful for some unusual scenarios. -> It would be great to provide a way to set the buffer size in IO​::Handle with current Perl.

even if it isn't feasible to implement this feature request, there is now a layer module on CPAN that provides this- PerlIO​::buffersize - perhaps that module could be mentioned alongside "setbuf" in the IO​::Handle docs as an alternative.

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2016

From spam-bitcard@yary.ack.org

Realized the "subject" of the ticket didn't match the contents very well- am editing it.

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2016

From [Unknown Contact. See original ticket]

Realized the "subject" of the ticket didn't match the contents very well- am editing it.

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

No branches or pull requests

2 participants