Backport #5585: windowsでファイルへの書き込みが異様に遅い
ruby-1.9.3-p0 mswin IO#write still slower than 1.9.2
In spite of Backport #5585, ruby-1.9.3-p0 is 10 times slower than 1.9.2.
str = '0123456789'*10
open('test.txt','wb') do |f|
ruby 1.9.2p290 (2011-07-09) [i386-mswin32_100]
ruby 1.9.3p0 (2011-10-30) [i386-mswin32_100] # after #5585 applied
I've reviewd r33667(trunk) and accepted its effectiveness. Thanks usa for your good job.
After the patch was applied, the test result:
ruby 1.9.3p0 (2011-10-30) [i386-mswin32_100]
ruby 1.9.3p0 (2011-10-30) [x64-mswin64_100]
Please backport the patch. Thanks.
merge revision(s) 33667:
- io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is set. this is the one of the reason of IO writing slowness of Windows in 1.9.3 or later.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e