busybox/archival/libarchive
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
..
bz fix assorted unused code and wrong format specs found by cppchekc (bug 6716) 2013-11-29 16:43:33 +01:00
unxz xz: mention xzminidec.c in README 2013-02-27 16:41:36 +01:00
data_align.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
data_extract_all.c rpm: use "create+rename" method of replacing existing files 2013-02-20 15:58:42 +01:00
data_extract_to_command.c *: change execl sentinels from NULL to (char*)0 2013-06-30 13:45:17 +02:00
data_extract_to_stdout.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
data_skip.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
decompress_bunzip2.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
decompress_gunzip.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
decompress_uncompress.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
decompress_unlzma.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
decompress_unxz.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
filter_accept_all.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
filter_accept_list_reassign.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
filter_accept_list.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
filter_accept_reject_list.c trivial small speed optimization 2012-06-22 15:54:05 +02:00
find_list_entry.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
get_header_ar.c ar: better comment 2013-09-10 16:27:08 +02:00
get_header_cpio.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
get_header_tar_bz2.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
get_header_tar_gz.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
get_header_tar_lzma.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
get_header_tar.c zcat: complain if input is not compressed 2014-02-02 02:06:38 +01:00
header_list.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
header_skip.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
header_verbose_list.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
init_handle.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
Kbuild.src Fix build failures caused by not compiling open_transformer.c (#2) 2013-05-15 03:23:30 +02:00
liblzo.h lzop: add overflow check 2014-06-30 10:14:34 +02:00
lzo1x_1.c
lzo1x_1o.c
lzo1x_9x.c fix assorted unused code and wrong format specs found by cppchekc (bug 6716) 2013-11-29 16:43:33 +01:00
lzo1x_c.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
lzo1x_d.c lzop: add overflow check 2014-06-30 10:14:34 +02:00
open_transformer.c libarchive: add capability to unpack to mem.buffer 2014-12-07 00:44:00 +01:00
seek_by_jump.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
seek_by_read.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
unpack_ar_archive.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00