Locally, this reduces a run of kobaltw assemble --noIncremental
on the Kobalt codebase itself from 47 seconds to 25 seconds.
When JarInputStream.nextEntry is invoked, the stream sets its position
and length so that it can directly be used to read the underlying content
associated with the entry. This avoids the need to call
JarFile(localFile).getInputStream(entry) and the cost associated with it.
addEntry has a slight change of semantics due to this change - it is now
the caller's responsibility to close the associated input stream. The two
existing calls to the method were adjusted accordingly.
Locally, this reduces a run of kobaltw assemble --noIncremental on the Kobalt codebase itself from 47 seconds to 25 seconds.
When JarInputStream.nextEntry is invoked, the stream sets its position and length so that it can directly be used to read the underlying content associated with the entry. This avoids the need to call JarFile(localFile).getInputStream(entry) and the cost associated with it.
addEntry has a slight change of semantics due to this change - it is now the caller's responsibility to close the associated input stream. The two existing calls to the method were adjusted accordingly.