Project

General

Profile

This project is closed and read-only.

Actions

Backport #2741

closed

gets with large file is slow in windoze

Backport #2741: gets with large file is slow in windoze

Added by rogerdpack (Roger Pack) over 16 years ago. Updated about 7 years ago.

Status:
Closed
Assignee:
-
[ruby-core:28160]

Description

=begin
Reposting from a different bug report...

10 MB

n = 100 * 1000 * 1000
puts "writing"
File.open("foo", 'wb'){|f| f.write(" " * n) }
puts "reading"
File.open("foo", 'rb') do |io|
io.gets
end

writing the file takes 1s, reading it takes 2000s, as it reads (in windows) in only in 4K bytes, so it is constantly resizing the string and recopying it. In Linux it has the same problem, but reads in 64K bytes, so the problem is much less.
=end


Related issues 2 (0 open2 closed)

Related to Backport187 - Backport #2722: gets on a large file takes a very very long timeClosedActions
Related to Ruby - Bug #2742: IO#read/gets can be very slow in dozeClosedActions

Updated by jeremyevans0 (Jeremy Evans) about 7 years ago Actions #1

  • Tracker changed from Bug to Backport
  • Project changed from 2 to 5
  • Description updated (diff)
  • Status changed from Open to Closed
  • ruby -v deleted (ruby 1.8.8dev (2010-02-11 revision 26645) [i386-mingw32])
Actions

Also available in: PDF Atom