зеркало из https://github.com/github/ruby.git
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
36b476cd1e
Коммит
39fd13bc5c
|
@ -1,3 +1,11 @@
|
||||||
|
Sat Jul 26 17:22:14 2014 URABE Shyouhei <shyouhei@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@80x24.org>
|
Sat Jul 26 16:55:18 2014 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
* iseq.h (struct iseq_compile_data_storage): reduce overhead
|
* iseq.h (struct iseq_compile_data_storage): reduce overhead
|
||||||
|
|
|
@ -43,7 +43,6 @@ dump_append(struct dump_config *dc, const char *format, ...)
|
||||||
|
|
||||||
if (dc->stream) {
|
if (dc->stream) {
|
||||||
vfprintf(dc->stream, format, vl);
|
vfprintf(dc->stream, format, vl);
|
||||||
fflush(dc->stream);
|
|
||||||
}
|
}
|
||||||
else if (dc->string)
|
else if (dc->string)
|
||||||
rb_str_vcatf(dc->string, format, vl);
|
rb_str_vcatf(dc->string, format, vl);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче