From: Yusuke Endoh Date: 2012-02-16T03:14:21+09:00 Subject: [ruby-core:42663] Re: [ruby-trunk - Feature #5995][Rejected] calling io_advise_internal() in read_all() Hello, 2012/2/15 Motohiro KOSAKI : > It doesn't. Because of, when we read whole file contents, we only need _one_ read syscall if the file is regular. In other words, current read_all() suck. �It read a few kilo bytes and append them to a string. That's said it create tons realloc. Really? I could be wrong, but as far as I know, IO#read first uses fstat to estimate a buffer length enough to load the whole content of the file. Masaki also showed the behavior. I think there is something wrong. -- Yusuke Endoh