in reply to Re: perl io and linux issues
in thread perl io and linux issues

I think the issue in question is that even running over a file, finding newlines, and forming lines, in the same way that readline should do, works faster in linux as a read of a block of data and subsequent line formation than as a readline.
An initial answer to this has already been made by tye in the note here.

I believe the question is asking more why Perl IO is broken on Linux, and what can be done to work around this in the meantime.


Replies are listed 'Best First'.
Re: perl io and linux issues
by dino (Sexton) on Apr 04, 2001 at 20:42 UTC
    After a little digging it appears not to be a problem with linux per se but glibc 2. (Please correct me if I'm wrong) Fast stdio io in perl uses the hooks _ptr and _cnt specified in the normal stdio.h. Unfortunately _cnt is not visible in the glibc 2 version. I've seen mentions of a glue.c file in glibc source that may allow a work around.

    If this is a glibc 2 then there may be future problems on other platforms, or do other platforms that use glibc 2 and have fast perl io, have a modified stdio.h?

    Perhaps sfio allows such direct hooks, has anybody else made progress on this issue?

    regards dino