Miscellaneous jar improvements
Tim Bell
Tim.Bell at Sun.COM
Thu Sep 10 10:43:57 PDT 2009
Andrew wrote:
>>>> changeset: 1283:ff32c270102a
>>>> user: martin
>>>> date: Mon Jun 22 21:07:20 2009 -0700
>>>> summary: 6853806: Prefer (cd $dir && jar) to jar -C for performance reasons
>
> Weird, I can't find that changeset. Got a URL?
Here is is in the JDK7 master forest:
http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/ff32c270102a
Martin wrote:
>>>> All told, there were at least 3 separate changesets in openjdk7 to
>>>> make building rt.jar faster.
More went by recently, including:
6834805: Improve jar -C performance
http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/ce55eb6668d9
6854795: Miscellaneous improvements to "jar"
http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/0cabe1192c8b
Discussed here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2009-July/001993.html
>>> But you put the lot into http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/b35f1e5075a4,
>>> right? That's what we have in IcedTea 6.
>> No, I was too lazy to backport 6853806.http://hg.openjdk.java.net/jdk7/jdk7/jdk/raw-rev/0cabe1192c8b
>> (Perhaps I determined it was unnecessary? I don't recall)
>>
>> The changes to the jar command benefit all users of the jar command,
>> unlike 6853806, which only benefits us poor folks building openjdk.
>
> Aha! Proof, if any more were needed, that it would be better to have
> had the backport discussion online... ;-)
>
> Out of interest, why does changing "jar -C" to (cd $dir && jar) make
> anything go faster?
> contributed by Jeremy Manson, who writes:
>
> """Basically, rt.jar seems to be built by taking a huge long list of
> directories:
> jar -C dir class -C dir class -C dir class <repeat 16000 times>
> All of these directories are *exactly the same place*. However, the jar command
> gives each a separate entry in the big list of directories.
> For each class, it iterates through all 16000 identical entries to find the
> right directory. Using HashSet reduces the size of this set to 1."""
See the full thread here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2009-April/001516.html
HTH-
Tim
More information about the distro-pkg-dev
mailing list