Project

General

Profile

Actions

Bug #1544

closed

rb_io_write bug?

Added by brianmario (Brian Lopez) almost 15 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
ruby -v:
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0]
[ruby-core:23642]

Description

=begin
I'm using rb_io_write to write (in C) to a StringIO instance (which was defined in Ruby, and passed to my C code) and noticed some strange behavior.
I'm writing to the IO at the beginning of a recursively called method and under 1.9.1 it's really slow unless I buffer up the contents then only write to the IO once using rb_io_write. For what I'm doing it's the difference between completing in 3.3 seconds, vs 0.13 seconds.
Under 1.8.6 I can write to the IO using rb_io_write in the smaller chunks (on ever recursive call) and it performs similar to the buffered write in 1.9.1.

Any known reason for this?
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0