Bug 84852 - Use pack200 compression inside NBMs
Use pack200 compression inside NBMs
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Autoupdate
5.x
All All
: P2 (vote)
: 6.x
Assigned To: dlipin
issues@platform
jdk_bug_6531345
:
: 104483 178292 (view as bug list)
Depends on: 181084
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-13 23:57 UTC by Jesse Glick
Modified: 2010-03-17 10:17 UTC (History)
7 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Patch to fix the issue (37.43 KB, patch)
2010-02-03 06:08 UTC, dlipin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2006-09-13 23:57:05 UTC
1. Change <makenbm> to convert all *.jar -> *.jar.pack.gz in its fileset, e.g.
using <pack200>.

2. Change o.n.updater to recognize and handle *.jar.pack.gz (and perhaps
*.jar.pack) automatically, e.g. using java.util.jar.Pack200.

Compression savings on JAR files containing mostly classes can be substantial.
This would be relatively easy, pretty transparent, and could make NBMs much smaller.
Comment 1 Jiri Rechtacek 2008-04-10 09:15:20 UTC
*** Issue 104483 has been marked as a duplicate of this issue. ***
Comment 2 rbalada 2008-09-04 13:14:05 UTC
Added issues@nbbuild to Cc. I would say this should be done in coordination with build engineering.

Before implementation in build system, please count with extreme memory leaks in pack200 (explicitly trash&gc pack200
instance very often).
Comment 3 Jiri Rechtacek 2008-10-16 17:27:10 UTC
It's not in our plans for a long time. IMHO I should close as WONTFIX.
Comment 4 Jesse Glick 2008-10-17 23:07:22 UTC
No? Seems to me like it would substantially decrease download time in most cases.
Comment 5 Jesse Glick 2009-12-08 09:47:53 UTC
Being talked about again.
Comment 6 Jesse Glick 2009-12-08 09:48:11 UTC
*** Bug 178292 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Tulach 2010-01-12 07:15:00 UTC
Let's assume we can do this for 6.9. We need a plan. I've composed
http://wiki.netbeans.org/FitnessForNBMs
based on the ideas found in this bug and bug 178292. Please look at the page and modify it to properly estimate the amount of necessary work. Thanks.
Comment 8 Jaroslav Tulach 2010-01-18 02:17:56 UTC
I've updated the page to reflect your comments. Let's do one more round of review. Thanks.
Comment 9 dlipin 2010-02-03 06:08:20 UTC
Created attachment 93798 [details]
Patch to fix the issue

Calling for review.

repository: http://hg.netbeans.org/prototypes/
branch: nbms-pack200-84852

Feel free to make changes directly to the branch or leave comments here.

Notes: 
1) It looks like memory leak is unpack200, not in pack200 so I used java API for Pack200 in MakeNBM. The leak is native code and I find no way to release memory that it uses. That`s why I used separate process - <javahome>/bin/unpack200 - to unpack the .pack.gz in AutoUpdate task and autoupdate.services.
2) There is no jar verification after it is packed at this moment. Cases when it is broken are rare so probably it is easier to mention such jars using pack200.excludes property than do verification for every packed jar which is rather time consuming operation.
Comment 10 Jaroslav Tulach 2010-02-03 09:27:42 UTC
Quite nice. I have not found a problem from my perspective. Just:

Y01 We shall make sure the pack200 leak is reported to JDK team and properly escalated
Comment 11 dlipin 2010-02-03 10:48:14 UTC
Re Y01:
Marek Slama has filed it about 3 years ago
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6531345
Not sure about escalation.
Comment 12 Antonin Nebuzelsky 2010-02-04 06:35:26 UTC
> Y01 We shall make sure the pack200 leak is reported to JDK team
> and properly escalated

I pinged the owners of #6531345 with a question about possibility of having a fix in an update of JDK 6. Will see what they reply.
Comment 13 Jesse Glick 2010-02-10 15:37:43 UTC
(In reply to comment #9)
> repository: http://hg.netbeans.org/prototypes/
> branch: nbms-pack200-84852
> 
> Feel free to make changes directly to the branch

prototypes #f4ceb8444fb1
prototypes #c1dbe6851cb7
prototypes #99f66b7ea1ee
prototypes #20a94046c5f8
Comment 14 dlipin 2010-02-12 08:13:20 UTC
Thanks everybody, merged to core-main.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo