Core Java Technologies Tech Tips (Comments)https://blogs.oracle.com/CoreJavaTechTips/feed/comments/atom2009-09-30T10:09:45+00:00Apache Rollerhttps://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1244640647000Re: Superduper Slow Jar CommandChristine Dorffi2009-06-10T13:30:47+00:002009-06-10T13:30:47+00:00
<p>The bug number is 6496274, per Xueming.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1244527757000Re: Superduper Slow Jar CommandStephen Hart2009-06-09T06:09:17+00:002009-06-09T06:09:17+00:00
<p>Is there a BugID for this jar performance enhancement done in JDK 7? I would like to vote on porting the fix to JDK 5.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243830208000Re: Superduper Slow Jar CommandTARUN KARMAKAR2009-06-01T04:23:28+00:002009-06-01T04:23:28+00:00
<p>I never bothered about the time it takes to create a jar....but this has opened my eyes....thanks...nice article....</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243535613000Re: Superduper Slow Jar CommandAntonio Dieguez2009-05-28T18:33:33+00:002009-05-28T18:33:33+00:00
<p>I got confused in my previous post, I got wrong the time of just building jars. It may be about 3 min of lost time daily at max in _my_ case, but obviously with other people it can be worse. Thanks for any improvement. Now please discover a hidden time-consuming loop at startup of java programs that someone forgot to delete :)</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243517771000Re: Superduper Slow Jar Commandinfernoz2009-05-28T13:36:11+00:002009-05-28T13:36:11+00:00
<p>Ouch, nasty, you could at least have asked the Hashtable if it contained the key value instead. IMHO it is way overdue that Sun removed all use of obsolete, useless, synchronized, classes like Hasktable, Vector, and StringBuffer, from all new JRE and JDK releases, when suitable alternatives are available.</p>
<p>I hope the jar command can be release as a standalone, with Java 1.3, 1.4, and 1.5, compatible code, so that us commercial Java developers, stuck on JDK 1.4, and 1.5, can patch our JDK's and have an easier life.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243426435000Re: Superduper Slow Jar CommandSpaceman Spiff2009-05-27T12:13:55+00:002009-05-27T12:13:55+00:00
<p>Xueming, thanks much for your response.</p>
<p>Concerning 2-4 GB jar/zip bugs, I cannot use 6u12 because it (and 6u13) has another bug that breaks some of my gui code. 6u14 is claimed to fix that bug, so I am stuck at 6u11 until it comes out.</p>
<p>Oh man, I am SO glad that you have finally added 64 bit ZIP support. Thats really good to hear.</p>
<p>However, I am really nervous about using a beta JDK, since some of my applications (trading, data backup) are just too critical. Is there any chance that this code will get released earlier than JDK 7, say in 6u14? I would love to see if sooner. For now, I have had to resort to using TAR files for my archiving (using an Apache library of dubious quality assurance...).</p>
<p>Speaking of JDK versions, is there any website that documents when we can expect new JDK releases to come out, like say when 6u14 is coming out?</p>
<p>On a different note, I have some other benchmarking results that are likely of interest to you (and anyone else reading this blog). I recently did a thorough exploration of the effect of buffer sizes on both byte and char writing using the usual JDK OutputStreams and Writers. One result is how bad PrintStream is for char writing compared to, say, BufferedWriter. (Looking at PrintStream's obscure source code, I think that I know why--and also how to fix it). I would like to share my results with you. What is the best way to contact you, if you are interested? I found your LinkedIn page <a href="http://www.linkedin.com/pub/xueming-shen/8/138/809" rel="nofollow">http://www.linkedin.com/pub/xueming-shen/8/138/809</a> but my free LinkedIn account cannot contact you. My LinkedIn page is <a href="http://www.linkedin.com/pub/brent-boyer/11/636/246" rel="nofollow">http://www.linkedin.com/pub/brent-boyer/11/636/246</a> if you would like to contact me.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243425201000Re: Superduper Slow Jar CommandAntonio Dieguez2009-05-27T11:53:21+00:002009-05-27T11:53:21+00:00
<p>I realize now this is very important. I build or rebuild many times during a day and that's 100% lose of time. More than 20 minutes lost I estimate. It is 100% of lose of time because I have to wait until it is finished since I want to see the results right away, also each build doesn't take way too much of time so I can't really do other thing in the meanwhile. Please backport it to jdk6.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243407634000Re: Superduper Slow Jar CommandNorman2009-05-27T07:00:34+00:002009-05-27T07:00:34+00:00
<p>I thought the Jar command was perfect since everybody is using it! : )</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243390454000Re: Superduper Slow Jar Commanddaniel2009-05-27T02:14:14+00:002009-05-27T02:14:14+00:00
<p>that is like 7 times improvement with the fix. amazing</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243341161000Re: Superduper Slow Jar CommandXueming Shen2009-05-26T12:32:41+00:002009-05-26T12:32:41+00:00
<p>Jon,</p>
<p>API doc for constainsValue() does include some warning words &quot;This operation will probably require time linear in the map size for most implementations of the Map interface&quot;. But I guess most people don't pay attention to it till you got a problem in hand, as we did:-)</p>
<p>I'm not a GC expert, but if you have a detailed test case or use scenario, instead of the general &quot;Tomcat&quot; + A webapp, I might try to pass it on...or you might have the bugid already.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243338917000Re: Superduper Slow Jar CommandXueming Shen2009-05-26T11:55:17+00:002009-05-26T11:55:17+00:00
<p>Spaceman Spiff,</p>
<p>I definitely hope (believe) id#6599383 (<br/>
<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6599383)" rel="nofollow">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6599383)</a> is the last nasty 2G-4G bug we have in the jar/zip code. This one has been fixed in the latest product release 6u12, as well as JDK7. So go use jar as your backup command from now:-) Oh, one more reason to start to use jar as the backup command is that jar now supports ZIP64 format (JDK7 for now), see my blog <a href="http://blogs.sun.com/xuemingshen/entry/zip64_support_for_4g_zipfile" rel="nofollow">http://blogs.sun.com/xuemingshen/entry/zip64_support_for_4g_zipfile</a> for a bit more details. Give JDK7 a try!</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243325190000Re: Superduper Slow Jar CommandJon2009-05-26T08:06:30+00:002009-05-26T08:06:30+00:00
<p>The java.net web site and a lot of Sun's other web sites including this one need speed improvements also. They have a tendency to run as slow as molasses.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243325035000Re: Superduper Slow Jar Commandalban2009-05-26T08:03:55+00:002009-05-26T08:03:55+00:00
<p>Thanks a lot.</p>
<p> We have seen the &quot;little&quot; slow in jar <br/>
creation but the reason arround it <br/>
we give to the project dimension.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243324963000Re: Superduper Slow Jar CommandJon2009-05-26T08:02:43+00:002009-05-26T08:02:43+00:00
<p>Can you now look at Tomcat or Java's classloader code and find out why reloading a web app causes PermGen OutOfMemoryErrors? This IMHO is a ridiculus problem that's existed for years which I've now written off as something that will never be fixed.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243324803000Re: Superduper Slow Jar CommandJon2009-05-26T08:00:03+00:002009-05-26T08:00:03+00:00
<p>That does seem like a dumb mistake with Hashtable. In this case I guess it seems obvious, but, it might be nice if the Javadocs said explicitly what the big O is for the different methods in the various collection classes. I noticed that .NET's documentation does this which I thought was nice. I don't remember whether Java's does or not. It doesn't seem to in this case. Again, it should be pretty obvious, but, given the fact that the implementation is encapsulated and hidden it's probably not a bad idea to mention in the docs.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243256360000Re: Superduper Slow Jar CommandMaung2009-05-25T12:59:20+00:002009-05-25T12:59:20+00:00
<p>The fix would help us a lot as our projects heavily rely on jar files and compiling, including auto-compiling project jar files, in netbeans takes us lots of time to wait until it has completely finished. Thank you for the fix.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1243170099000Re: Superduper Slow Jar CommandSpaceman Spiff2009-05-24T13:01:39+00:002009-05-24T13:01:39+00:00
<p>Xueming: great to see someone at Sun looking into stuff like this.</p>
<p>I had to give up on the jar command for my backups because of its crippling 32-bitness (it cannot do &gt; 2 GB files). I would love to see that behavior fixed. Plus, proper AES-256 encryption.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242921928000Re: Superduper Slow Jar CommandChristine Dorffi2009-05-21T16:05:28+00:002009-05-21T16:05:28+00:00
<p>Regarding JDK 7 releases: Watch for announcements at the 2009 JavaOne Conference, June 2-5, San Francisco, California. Website is <a href="http://java.sun.com/javaone/" rel="nofollow">http://java.sun.com/javaone/</a></p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242907381000Re: Superduper Slow Jar CommandFrank2009-05-21T12:03:01+00:002009-05-21T12:03:01+00:00
<p>Nice to hear that, so when can we officially enjoy jdk7 ? Any release date ?<br/>
Also, I'm waiting for the JWebPane, do you know (as an insider ) if it will come with jdk7 ? Thanks !</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242862067000Re: Superduper Slow Jar CommandEmmanuel Puybaret2009-05-20T23:27:47+00:002009-05-20T23:27:47+00:00
<p>Will the classes of java.util.zip (and java.util.jar) benefit of this perfomance gain? <br/>
Can we also expect these classes to run faster even if the zipped content doesn't contain too many files?</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242690479000Re: Superduper Slow Jar CommandXueming2009-05-18T23:47:59+00:002009-05-18T23:47:59+00:00
<p>goodness me:</p>
<p>Some performance tuning has been done in jdk7-b46 for &quot;unjaring&quot; as well. It should be &quot;much faster (&quot;vastly faster&quot;?) now to extract &quot;a list of files&quot; out of a huge jar file, if this &quot;a list of files&quot; is not the whole jar file. The gain is very obvious if this &quot;a list of files&quot; is a very small portion of a huge jar file.</p>
<p>For example &quot;jar xf rt.jar sun/util&quot; is almost 2 times faster on my system (rt.jar is compressed when measuring).</p>
<p>I might be able to comment more if you can provide a specific use scenario.</p>
<p>Please try the jar in latest jdk7, see if the &quot;unjaring&quot; improves in your case. And let me know the result:-)</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242623841000Re: Superduper Slow Jar Commandgoodness me2009-05-18T05:17:21+00:002009-05-18T05:17:21+00:00
<p>Can you improve the unjarring too?<br/>
Unzip is vastly faster than jar x.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242619570000Re: Superduper Slow Jar CommandStefan Lotties2009-05-18T04:06:10+00:002009-05-18T04:06:10+00:00
<p>Haha, nice! I actually never cared much about the performance of JAR, but good to know if things get faster :)</p>
<p>How about doing multithreading stuff to run faster on smp systems? ;)</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242605099000Re: Superduper Slow Jar Commandreddit2009-05-18T00:04:59+00:002009-05-18T00:04:59+00:00
<p>I am a redditor, and I approve this change!</p>
<p>Java FTW</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242604926000Re: Superduper Slow Jar Commandpeterreilly2009-05-18T00:02:06+00:002009-05-18T00:02:06+00:00
<p>You meant an add to a vector and not the hashtable.</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242580764000Re: Superduper Slow Jar CommandNot My Real Name2009-05-17T17:19:24+00:002009-05-17T17:19:24+00:00
<p>Thank you for your work!</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242569380000Re: Superduper Slow Jar CommandAnon2009-05-17T14:09:40+00:002009-05-17T14:09:40+00:00
<p>There is just no way I would have picked up on this difference without a profiler. It's not obvious from a quick glance at the Hashtable docs that containsValue was going to be so expensive (if you think about it then yes it is obvious but when it is just called contains this fact is somewhat hidden).</p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242568825000Re: Superduper Slow Jar Commandpopurls.com // popular today2009-05-17T14:00:25+00:002009-05-17T14:00:25+00:00[Trackback] story has entered the popular today section on popurls.comhttps://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242477512000Re: Superduper Slow Jar CommandPreston L. Bannister2009-05-16T12:38:32+00:002009-05-16T12:38:32+00:00
<p>Good - and long overdue.</p>
<p>Was quite annoyed when I first looked at the ZIP (jar) code, more than a decade ago, and saw code that was not at all efficient (and as confirmed by comparing with Info-Zip ZIP times). </p>
https://blogs.oracle.com/CoreJavaTechTips/entry/superduper_slow_jar#comment-1242415122000Re: Superduper Slow Jar Commandguest2009-05-15T19:18:42+00:002009-05-15T19:18:42+00:00
<p>So that's why netbeans chokes and asphyxiates when doing build all.</p>