I can't reproduce the problem under Ubuntu 12.04 LTS beta. I generated a 100MB random file, and compressed it with bzip2 to produce testfile-bzip2.bz2, and again with pbzip2 1.1.7 to produce testfile-pbzip2.bz2. Results at the end.
After searching around I've found this thread http://lists.denx.de/pipermail/eldk/2009-September/000982.html which suggests that the pthread_cond_wait() can cause 100% CPU usage if a program isn't compiled with the right pthread library. Since the original bug report mentioned gentoo, I'd be curious to know how the original package was built.
$ time ./pbzip2 -d -c > /dev/null testfile-pbzip2.bz2
real 0m6.478s
user 0m24.982s
sys 0m0.412s
$ time bzip2 -d -c > /dev/null testfile-pbzip2.bz2
real 0m15.225s
user 0m15.149s
sys 0m0.040s
$ time ./pbzip2 -d -c > /dev/null testfile-bzip2.bz2
real 0m15.079s
user 0m15.197s
sys 0m0.072s
$ time bzip2 -d -c > /dev/null testfile-bzip2.bz2
real 0m15.167s
user 0m15.097s
sys 0m0.032s
I can't reproduce the problem under Ubuntu 12.04 LTS beta. I generated a 100MB random file, and compressed it with bzip2 to produce testfile-bzip2.bz2, and again with pbzip2 1.1.7 to produce testfile- pbzip2. bz2. Results at the end.
After searching around I've found this thread http:// lists.denx. de/pipermail/ eldk/2009- September/ 000982. html which suggests that the pthread_cond_wait() can cause 100% CPU usage if a program isn't compiled with the right pthread library. Since the original bug report mentioned gentoo, I'd be curious to know how the original package was built.
$ time ./pbzip2 -d -c > /dev/null testfile-pbzip2.bz2
real 0m6.478s
user 0m24.982s
sys 0m0.412s
$ time bzip2 -d -c > /dev/null testfile-pbzip2.bz2
real 0m15.225s
user 0m15.149s
sys 0m0.040s
$ time ./pbzip2 -d -c > /dev/null testfile-bzip2.bz2
real 0m15.079s
user 0m15.197s
sys 0m0.072s
$ time bzip2 -d -c > /dev/null testfile-bzip2.bz2
real 0m15.167s
user 0m15.097s
sys 0m0.032s