This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

improving read-line


read-line is presently just a wrapper around read-delimited, which is
dog-slow.  I'd like to make it use %read-line instead, which should
give us a considerable performance improvement.  However, since
%read-line relies on fgets for regular files and pipes, it can only
handle newline-delimited lines.  That means that if you've rebound
scm-line-incrementors in order to change the behavior of read-line,
you'll have to call read-delimited instead.

While I'm at it, I'd also like to get rid of the `split' and `peek'
arguments to read-line.  These are a pain in the neck to implement and
don't seem to be very useful if you're only reading newline-delimited
records.

The upshot of the proposed changes are: if you're using read-line with
the `split' or `peek' options, or if you've rebound
scm-line-incrementors, you'll need to change your code to use
read-delimited.  Everyone else should be unaffected.

Are there any objections to this change?  Please please please please
say no.

love, T.