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:
Con Kolivas 2011-02-22 00:49:50 +11:00
parent 88e3df6af1
commit bb33f7571c
4 changed files with 46 additions and 20 deletions

7
util.c
View file

@ -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 */