Re: Reading & Writing in a Stream

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 03/07/04


Date: Sun, 7 Mar 2004 19:22:32 -0000

Cor <non@non.com> wrote:
> > Your post gave the impression (to me at least) that you thought you
> > could write strings directly to a stream, which you can't.
>
> Did you see me write here that I thought that you said that it was only
> possible to write bytearrays to disk?

No, I didn't - but that's basically true. Of course, you can *convert*
strings to byte arrays using StreamWriter, but it's still going to
write bytes to disk, one way or other.
 
> That I could have been writing very easy by what you where telling and than
> telling to you that you can only write bytes to a disk.

Sorry, could you rephrase that? I didn't understand that sentence.

I still say it's irrelevant whether or not the OP's stream is writing
to disk though.

-- 
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Relevant Pages

  • Re: Code density and performance?
    ... you can't just stream the data continuously using multi-buffering), then if you let positioning overhead consume as large a percentage of access time as transfer overhead you've thrown away most of half your theoretical maximum disk bandwidth. ... sequential requests), 64 KB buffers are often big enough to achieve full ... For this particular task it would seem that a buffer size of 256 ...
    (comp.arch)
  • Re: File Streams
    ... >one line at a time to a disk file and making it comma delimeted at the same ... > I know I could store pointers for the positon I'm at in the array, ... >working array then dump it it may be faster and less hassles, or a stream. ... Generally I have found that the optimum speed is obtained by writing ...
    (alt.comp.lang.borland-delphi)
  • Re: Hardware musings
    ... The only problem arises when you try to recreate a physical disk. ... this bit stream format should encompass any formatting known or unknown. ... Tracks are continuous circles. ...
    (comp.sys.apple2)
  • Solaris 9 vs 10 paging...
    ... We have custom "writer" software which writes from a file on disk to the PCI device, as well as "reader" software, which reads from it back out to a file on disk. ... The unit allows multiple streams and we often set a steady 2Kbps in one stream and up to 6Mbps on the other. ... For Solaris 10, it works well up until you hit around 5 or 6Mbps, along with the 2Kbps stream. ...
    (comp.unix.solaris)
  • Re: ext2/3 performance regression in 2.6 vs 2.4 for small interleaved writes
    ... > occur when slowly streaming files to disk. ... I don't know why the single-stream case would be slower, ... which was created at the same time as a second stream is significantly ... filesystem is at laying the files out, ...
    (Linux-Kernel)