At 05:35 PM 9/21/00 -0400, Uri Guttman wrote:
> >>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
>
>   DS> I would *really* like perl's I/O system to do async reads and
>   DS> writes to disk files whenever possible. That'd let us get another
>   DS> burst of speed in some spots, particularly when slurping through
>   DS> files sequentially (which is what's done maybe 95% of the time).
>
>i proposed some of that in my rfc47 (universal async i/o). at the perl
>level you need a delivery interface as with events.

I'm not really worried about the perl level for this. I'm more concerned 
with the low-level internal implementation.

>internally i see it
>being useful too for the speedup of sequential files. but how do you
>know a file is sequential?

Who cares? If the filehandle's read within a while(), or in list context, 
we can use a big readahead buffer and issue a lot of async I/O requests. 
For filehandles read with a plain scalar fetch off a filehandle we can use 
a smaller readahead buffer.

Async writes are a win in any case.

>most unix kernels do readahead blocks anyway
>but if you seek, you waste that.

So? We lose in that case, but not by much. If we give full control to the 
user programs (and I'd like to) then the user can get fancy and we'll leave 
the decision to the program.


                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to