win32utils-devel@rubyforge.org
2004-Nov-17 10:50 UTC
[Win32utils-devel] nread and nwrite optimizations
Hi all, So far, so good. Things seem to work just fine and, in the case of nread, I am getting incredible performance. I can''t tell if this is due to some kind of caching, however. Anyway, there a couple of things I want to work out yet. The first is File#nread and Really Big Files. I created a 500 mb text file and sucked it into memory using Ruby''s File#read method just fine. However, when I tried to use File#nread, it eventually died with a memory allocation error. Since I have 1GB of RAM (and wasn''t using much), I''m not sure why it would complain. The second issue is getting FILE_FLAG_NO_BUFFERING to work. Mostly I just want to see if this will lead to a significant performance increase with reads and writes. But, using it has certain requirements that I don''t totally understand. Any ideas for these two issues are definitely welcome. Dan
win32utils-devel@rubyforge.org
2004-Nov-18 00:26 UTC
[Win32utils-devel] nread and nwrite optimizations
Hi,> > Hi all, > > So far, so good. Things seem to work just fine and, in the case of > nread, I am getting incredible performance. I can''t tell if this is due > to some kind of caching, however. > > Anyway, there a couple of things I want to work out yet. The first is > File#nread and Really Big Files. I created a 500 mb text file and > sucked it into memory using Ruby''s File#read method just fine. However, > when I tried to use File#nread, it eventually died with a memory > allocation error. Since I have 1GB of RAM (and wasn''t using much), I''m > not sure why it would complain. >For me, the memory allocation always return sucess. Even if 625 mb file> The second issue is getting FILE_FLAG_NO_BUFFERING to work. Mostly I > just want to see if this will lead to a significant performance increase > with reads and writes. But, using it has certain requirements that I > don''t totally understand. >It seems that Reading the whole data with one ReadFile using FILE_FLAG_NO_BUFFERING is not working for large file. Refer to http://www.winimage.com/readfile.htm It contains source code and shows various ReadFile methods.> Any ideas for these two issues are definitely welcome. >Regards, Park Heesob --MIME Multi-part separator--