mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-06 23:04:04 +00:00
Multi-threading speed ups.
Add one more thread on compression and decompression to account for the staggered nature of thread recruitment. Make the initial buffer slightly smaller and make it progressively larger, thus recruiting threads sooner and more evenly. This also speeds up decompression for the same reason. Check the amount of memory being used by each thread on decompression to ensure we don't try to recruit too much ram.
This commit is contained in:
parent
88e3df6af1
commit
bb33f7571c
4 changed files with 46 additions and 20 deletions
7
util.c
7
util.c
|
|
@ -83,6 +83,13 @@ void sighandler()
|
|||
exit(0);
|
||||
}
|
||||
|
||||
void round_to_page(i64 *size)
|
||||
{
|
||||
*size -= *size % control.page_size;
|
||||
if (unlikely(!*size))
|
||||
*size = control.page_size;
|
||||
}
|
||||
|
||||
void read_config( struct rzip_control *control )
|
||||
{
|
||||
/* check for lrzip.conf in ., $HOME/.lrzip and /etc/lrzip */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue