[前][次][番号順一覧][スレッド一覧]

ruby-changes:34876

From: shyouhei <ko1@a...>
Date: Sat, 26 Jul 2014 17:28:11 +0900 (JST)
Subject: [ruby-changes:34876] shyouhei:r46959 (trunk): * ext/objspace/objspace_dump.c (dump_append): avoid fflush.

shyouhei	2014-07-26 17:28:05 +0900 (Sat, 26 Jul 2014)

  New Revision: 46959

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46959

  Log:
    * ext/objspace/objspace_dump.c (dump_append): avoid fflush.
    
      because dump_append_string_value() iterates over each chars,
      fflush()-ing here effectively issues system calls on every single
      bytes exist in a ruby process.

  Modified files:
    trunk/ChangeLog
    trunk/ext/objspace/objspace_dump.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46958)
+++ ChangeLog	(revision 46959)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jul 26 17:22:14 2014  URABE Shyouhei  <shyouhei@r...>
+
+	* ext/objspace/objspace_dump.c (dump_append): avoid fflush.
+
+	  because dump_append_string_value() iterates over each chars,
+	  fflush()-ing here effectively issues system calls on every single
+	  bytes exist in a ruby process.
+
 Sat Jul 26 16:55:18 2014  Eric Wong  <e@8...>
 
 	* iseq.h (struct iseq_compile_data_storage): reduce overhead
Index: ext/objspace/objspace_dump.c
===================================================================
--- ext/objspace/objspace_dump.c	(revision 46958)
+++ ext/objspace/objspace_dump.c	(revision 46959)
@@ -43,7 +43,6 @@ dump_append(struct dump_config *dc, cons https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L43
 
     if (dc->stream) {
 	vfprintf(dc->stream, format, vl);
-	fflush(dc->stream);
     }
     else if (dc->string)
 	rb_str_vcatf(dc->string, format, vl);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]