git://wimlib.net
/
wimlib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c902ba4
)
write_stream_list(): Do not create threads to compress 1 chunk or less
author
Eric Biggers
<ebiggers3@gmail.com>
Mon, 13 Jan 2014 06:30:50 +0000
(
00:30
-0600)
committer
Eric Biggers
<ebiggers3@gmail.com>
Mon, 13 Jan 2014 06:30:50 +0000
(
00:30
-0600)
src/write.c
patch
|
blob
|
history
diff --git
a/src/write.c
b/src/write.c
index a852c199670c9a6265cc043be19a6908d98c9ecb..63350bfc83bcaa8c61ca29a4bb6b688180c87f70 100644
(file)
--- a/
src/write.c
+++ b/
src/write.c
@@
-1430,11
+1430,11
@@
write_stream_list(struct list_head *stream_list,
* to do compression. There are serial and parallel implementations of
* the chunk_compressor interface. We default to parallel using the
* specified number of threads, unless the upper bound on the number
* to do compression. There are serial and parallel implementations of
* the chunk_compressor interface. We default to parallel using the
* specified number of threads, unless the upper bound on the number
- * bytes needing to be compressed is less
2000000 (heuristic value)
. */
+ * bytes needing to be compressed is less
than a heuristic value
. */
if (out_ctype != WIMLIB_COMPRESSION_TYPE_NONE) {
#ifdef ENABLE_MULTITHREADED_COMPRESSION
if (out_ctype != WIMLIB_COMPRESSION_TYPE_NONE) {
#ifdef ENABLE_MULTITHREADED_COMPRESSION
- if (ctx.num_bytes_to_compress >
= 2000000
) {
+ if (ctx.num_bytes_to_compress >
max(2000000, out_chunk_size)
) {
ret = new_parallel_chunk_compressor(out_ctype,
out_chunk_size,
num_threads, 0,
ret = new_parallel_chunk_compressor(out_ctype,
out_chunk_size,
num_threads, 0,