Use buffered output stream when packaging files (approx. 6x faster)

Description

Creating an installer with IzPack 5 is quite slow.

With IzPack 4 packaging a project with 70MB of data took a few seconds. The same project with IzPack 5 over 30 seconds. Today I noticed that using a buffered output stream reduces time spent on packaging significantly.

The PR contains test method PackagerTest#measureWriteSpeed() which generates an installer from a pack with two files of 10MB each. The call to packager.createInstaller() is measured and the result print to standard output.

Output w/o buffer: Writing pack of 20971520 KiB took 8038ms
Output with buffer: Writing pack of 20971520 KiB took 1415ms

Environment

mvn -DfailIfNoTests=false -pl izpack-compiler -am test -Dtest=PackagerTest#measure*

Assignee

Michael Aichler

Reporter

Michael Aichler

Impact

Code optimizations and cleanup - safe for all environments

Components

Sprint

None

Fix versions

Affects versions

Priority

Medium
Configure