[GRADLE-3441] BZIP2 compression extremely slow Created: 18/Apr/16  Updated: 19/Apr/16  Resolved: 19/Apr/16

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 2.14-rc-1

Type: Bug
Reporter: Sterling Greene Assignee: Unassigned
Resolution: Fixed Votes: 0


 Description   

BZIP2 compression extremely slow

https://discuss.gradle.org/t/bzip2-compression-extremely-slow/16738

I am working on migrating an Ant-based project to Gradle, and one sticking point is that the distTar task with compression = Compression.BZIP2 set is 5x slower than the equivalent Ant task.

Is this a known issue? Is there a good fix or workaround?

Edit: For a workaround, having Gradle make an uncompressed .tar and then bzipping with Ant speeds things up immensely:

distTar.compression = Compression.NONE
distTar.doLast {
ant.bzip2(src: distTar.archivePath, destfile: "${distTar.archivePath}.bz2")
delete distTar.archivePath // optional
}



 Comments   
Comment by Aaron Madlon-Kay [ 19/Apr/16 ]

Wow, that was fast. Buffering FTW!
https://github.com/gradle/gradle/commit/612c7830ce943ef8c57924f51935ef2492fc3eb6

Thanks!

Generated at Wed Jun 30 12:48:54 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.