1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext
normal 787fab5bbf zlib: reduce garbage on Zlib::GzipReader#readpartial
For garbage-concious users who use the `outbuf' argument of
`readpartial' to supply a destination buffer, this provides
a drastic reduction in garbage when inflating large inputs
in a streaming fashion.

This results in a anonymous RSS reduction in the reader
similar to the reduction in the writer from r61631.

Results using the test script from r61631
<https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61631>

Before:

        writer   7.359999   0.000000   7.359999 (  7.360639)
        writer RssAnon:     4040 kB
        reader   6.346667   0.070000   6.416667 (  7.387654)
        reader RssAnon:    98272 kB

After:

        writer   7.309999   0.000000   7.309999 (  7.310651)
        writer RssAnon:	    4048 kB
        reader   6.146666   0.003333   6.149999 (  7.334868)
        reader RssAnon:	    4300 kB

* ext/zlib/zlib.c (struct read_raw_arg): new struct
  (gzfile_read_raw_partial): use read_raw_arg
  (gzfile_read_raw_rescue): ditto
  (gzfile_read_raw): accept outbuf, use read_raw_arg
  (gzfile_read_raw_ensure): accept outbuf
  (gzfile_read_header): ditto
  (gzfile_check_footer): ditto
  (gzfile_read_more): ditto
  (gzfile_read_raw_until_zero): adjust for changes
  (gzfile_fill): ditto
  (gzfile_readpartial): ditto
  (gzfile_read_all): ditto
  (gzfile_getc): ditto
  (gzfile_reader_end_run): ditto
  (gzfile_reader_get_unused): ditto
  (rb_gzreader_initialize): ditto
  (gzreader_skip_linebreaks): ditto
  (gzreader_gets): ditto
  (zlib_gunzip_run): ditto
  [ruby-core:84660] [Feature #14319]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-08 01:11:38 +00:00
..
-test- long long is a C99ism 2018-01-02 06:41:47 +00:00
bigdecimal flexible array member is a C99ism 2018-01-02 06:41:48 +00:00
cgi/escape
continuation
coverage ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE 2017-12-12 00:20:58 +00:00
date Bump version to date-1.0.0 as default gems. 2017-12-11 03:56:01 +00:00
dbm Bump dbm-1.0.0 for released version. 2017-12-06 08:32:01 +00:00
digest Remove digest.gemspec for default gems. 2017-12-19 02:43:09 +00:00
etc Bump version to etc-1.0.0 as default gems. 2017-12-13 05:52:47 +00:00
fcntl Bump version to fcntl-1.0.0 as default gems. 2017-12-11 06:03:53 +00:00
fiber
fiddle Bump fiddle-1.0.0 for released version. 2017-12-06 08:35:13 +00:00
gdbm Bump gdbm-2.0.0 for released versionn. 2017-12-06 08:34:34 +00:00
io gperf.sed: static declarations 2017-12-15 14:42:43 +00:00
json
nkf
objspace node.h: remove NODE_PRELUDE 2018-01-05 08:59:23 +00:00
openssl openssl: import v2.1.0 2017-12-14 11:19:16 +00:00
pathname pathname.c: improve docs for Pathname 2017-11-07 20:14:46 +00:00
psych Merge psych-3.0.2 from ruby/psych. 2017-12-19 09:44:33 +00:00
pty
racc/cparse
rbconfig/sizeof
readline
ripper Ripper::Lexer bit predicates 2017-12-13 10:26:09 +00:00
rubyvm
sdbm Bump version to sdbm-1.0.0 as default gems. 2017-12-11 06:48:09 +00:00
socket ifaddr.c: get_ifaddrs 2017-12-22 01:49:00 +00:00
stringio [DOC] StringIO#write accepts multiple arguments since r60377 [ci skip] 2017-12-22 03:35:54 +00:00
strscan Update version of strscan to 1.0.0. 2017-12-19 03:12:22 +00:00
syslog
win32
win32ole hide internal data objects 2017-12-04 07:37:21 +00:00
zlib zlib: reduce garbage on Zlib::GzipReader#readpartial 2018-01-08 01:11:38 +00:00
.document
extmk.rb extmk.rb: exclude recursively 2018-01-07 02:49:27 +00:00
Setup
Setup.atheos
Setup.nt