This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178292 - Effective NBM format with pack200 compression support
Summary: Effective NBM format with pack200 compression support
Status: RESOLVED DUPLICATE of bug 84852
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 6.x
Hardware: Other Linux
: P2 normal (vote)
Assignee: dlipin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-08 05:54 UTC by Jaroslav Tulach
Modified: 2009-12-08 09:48 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2009-12-08 05:54:52 UTC
The NBM format remains the same since 1998 and does not use latest enhancements in JAR compressions (pack200). This adds unnecessary additional cost to every NBM download in terms of transmitted bits as well as download time.

Consider changing AutoUpdate, MakeNBM to recognize enhanced format of NBM packed by pack200. One possible way is to "extract" the JARs inside NBM files, leaving its classfiles visible fro pack200. Instead of netbeans/modules/org-openide-util.jar there would be:

netbeans/modules/org-openide-util.jar/org/openide/util/Lookup.class
netbeans/modules/org-openide-util.jar/org/openide/util/LookupListener.class

The updater would then need to convert this back into org-openide-util.jar when unpacking.

Jesse mentioned that this would involve changes to AU, various Ant tasks in nbbuild (at least AutoUpdate and MakeNBM), and probably also to the Maven packaging plugins.

One needs to be careful with foreign signed JARs like JavaHelp; easiest to leave these intact. You could explode and repack the META-INF/* files which determine the signature, but you could not run Pack200 on these classfiles anyway - unless the JAR has already been "normalized" before signing (*), which it would be possible to detect from a tool at some build-time cost.

(*) http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html#pack200_compression describes 'pack200 --repack'.
Comment 1 dlipin 2009-12-08 06:00:58 UTC
some more ideas in Issue 104483 and Issue 84852.

PS. pack200 is not memory leak free, so it should be used with care.
Comment 2 dlipin 2009-12-08 06:15:21 UTC
Wouldn`t it be better to compress only jar file itself, not really the NBM?
netbeans/modules/org-openide-util.jar.pack.gz

PS. Right, we can`t pack signed jars as well as some others (e.g. mysql-connector with JDK5, and a bunch of jars in JavaFX SDK, and files which goes together with .jad descriptor). We have some tools in NBI to do packaging and further verification, they can be reused in AU.
Comment 3 Jesse Glick 2009-12-08 09:48:10 UTC
I thought this had already been filed.

*** This bug has been marked as a duplicate of bug 84852 ***