[
https://issues.apache.org/jira/browse/JCRVLT-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032684#comment-16032684
]
Tobias Bocanegra commented on JCRVLT-163:
-----------------------------------------
[~marett] thanks for the patch. I quickly checked it and looks good to me,
except that your tests take a very long time and seem to fail when there is
nothing to optimize.
also another test fails:
because of this change:
{noformat}
jOut.setLevel(NO_COMPRESSION); // The entry to be written is assumed to
not be compressible
{noformat}
{noformat}
-------------------------------------------------------------------------------
Test set: org.apache.jackrabbit.vault.packaging.integration.TestPackageInstall
-------------------------------------------------------------------------------
Tests run: 27, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 3.018 sec <<<
FAILURE!
testRewrap(org.apache.jackrabbit.vault.packaging.integration.TestPackageInstall)
Time elapsed: 0.084 sec <<< ERROR!
java.util.zip.ZipException: invalid entry compressed size (expected 2 but got 5
bytes)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:267)
at
org.apache.jackrabbit.vault.fs.io.JarExporter.write(JarExporter.java:219)
at
org.apache.jackrabbit.vault.packaging.impl.PackageManagerImpl.rewrap(PackageManagerImpl.java:221)
at
org.apache.jackrabbit.vault.packaging.impl.PackageManagerImpl.rewrap(PackageManagerImpl.java:165)
at
org.apache.jackrabbit.vault.packaging.impl.JcrPackageManagerImpl.rewrap(JcrPackageManagerImpl.java:671)
at
org.apache.jackrabbit.vault.packaging.integration.TestPackageInstall.testRewrap(TestPackageInstall.java:77)
....
{noformat}
> Avoid compressing incompressible binaries
> -----------------------------------------
>
> Key: JCRVLT-163
> URL: https://issues.apache.org/jira/browse/JCRVLT-163
> Project: Jackrabbit FileVault
> Issue Type: Improvement
> Components: Packaging
> Affects Versions: 3.0
> Reporter: Timothee Maret
> Fix For: 3.1.40
>
> Attachments: JCRVLT-163.patch
>
>
> As discussed in [0], this issue tracks allowing to specify the compression
> level when building packages. The primary idea is to avoid compressing
> (compression level = {{NO_COMPRESSION}}) already compressed binaries,
> identified based on their MIME type.
> Setting the compression level is a tradeoff between the compression speed and
> the size of the compressed artefacts.
> Different use cases likely favour maximising either of the two.
> Therefor, it may make sense to allow configuring the compression levels per
> use case (not globally).
> A generic way to express this configuration would be:
> * a mapping from MIME type to compression level
> * the default level (for MIME type not matching any entry in the mapping)
> [0] https://www.mail-archive.com/[email protected]/msg37807.html
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)