busybox/archival
Denys Vlasenko b4c11c1397 libarchive: add capability to unpack to mem.buffer
The performance and number of processes for a "depmod -a" with gzipped
modules was abysmal. This patch adds a code path without fork,
benefiting all users of xmalloc_open_zipped_read_close.

"modinfo radeon.ko.gz", a single-file reader, got 30% faster.
"depmod -a", which used to fork over 800 times, got 20% faster.

Heavily based on a patch by Lauri Kasanen <curaga@operamail.com>

function                                             old     new   delta
setup_transformer_on_fd                                -     159    +159
transformer_write                                      -     122    +122
fork_transformer                                       -     112    +112
xmalloc_open_zipped_read_close                        63     118     +55
read_bunzip                                         1866    1896     +30
xtransformer_write                                     -      19     +19
unzip_main                                          2449    2462     +13
bbunpack                                             755     766     +11
unpack_lzma_stream                                  2717    2723      +6
unpack_xz_stream                                    2393    2397      +4
unpack_Z_stream                                     1173    1175      +2
inflate_unzip                                        111     105      -6
check_signature16                                     70      63      -7
unpack_bz2_stream                                    359     349     -10
unpack_unxz                                           12       -     -12
unpack_unlzma                                         12       -     -12
unpack_uncompress                                     12       -     -12
unpack_gunzip                                         12       -     -12
unpack_bunzip2                                        12       -     -12
open_transformer                                     106      92     -14
inflate_unzip_internal                              1945    1916     -29
unpack_gz_stream                                     693     655     -38
open_zipped                                           89      47     -42
setup_unzip_on_fd                                    142      53     -89
------------------------------------------------------------------------------
(add/remove: 4/5 grow/shrink: 7/8 up/down: 533/-295)          Total: 238 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-07 00:44:00 +01:00
..
libarchive libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
ar.c archival/*: move "config:" snippets into .c files 2013-11-14 11:39:00 +01:00
bbunzip_test2.sh
bbunzip_test3.sh
bbunzip_test.sh
bbunzip.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
bzip2.c Rename transformer_aux_data_t -> transformer_state_t 2014-12-07 00:42:49 +01:00
Config.src archival/*: move "config:" snippets into .c files 2013-11-14 11:39:00 +01:00
cpio.c cpio: reinstate "options:" line in help text 2014-06-30 17:19:17 +02:00
dpkg_deb.c dpkg-deb: cosmetic correction to usage text 2013-11-28 12:38:25 +01:00
dpkg.c archival/*: move "config:" snippets into .c files 2013-11-14 11:39:00 +01:00
gzip.c Rename transformer_aux_data_t -> transformer_state_t 2014-12-07 00:42:49 +01:00
Kbuild.src archival/*: move "kbuild:" snippets into .c files 2013-11-14 09:53:52 +01:00
lzop.c Rename transformer_aux_data_t -> transformer_state_t 2014-12-07 00:42:49 +01:00
rpm2cpio.c zcat: complain if input is not compressed 2014-02-02 02:06:38 +01:00
rpm.c zcat: complain if input is not compressed 2014-02-02 02:06:38 +01:00
rpm.h *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
tar.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
unzip.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00