Backport #5592

Backport #5585: windowsでファイルへの書き込みが異様に遅い

ruby-1.9.3-p0 mswin IO#write still slower than 1.9.2

Added by Akio Tajima over 2 years ago. Updated about 2 years ago.

[ruby-core:40838]
Status:Closed
Priority:Normal
Assignee:-

Description

In spite of Backport #5585, ruby-1.9.3-p0 is 10 times slower than 1.9.2.

#-test script
t=Time.new
str = '0123456789'*10
open('test.txt','wb') do |f|
100000.times do
f.write str
end
end
puts "Write:#{Time.new-t}(s)"

ruby 1.9.2p290 (2011-07-09) [i386-mswin32_100]
Write:0.068004(s)

ruby 1.9.3p0 (2011-10-30) [i386-mswin32_100] # after #5585 applied
Write:0.914052(s)

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]
Write:0.069004(s)

ruby 1.9.3p0 (2011-10-30) [x64-mswin64_100]
Write:0.066004(s)

Please backport the patch. Thanks.

io.c.patch5585 (517 Bytes) Akio Tajima, 11/08/2011 08:49 PM

Associated revisions

Revision 34436
Added by Usaku NAKAMURA about 2 years ago

merge revision(s) 33667:

  • io.c (iofwrite): call rbw32writeconsole() 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.

[Backport #5592]

History

#1 Updated by Usaku NAKAMURA about 2 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF