1 <!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <html> 3 <head> 4 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> 5 <meta http-equiv="content-style-type" content="text/css"> 6 <link rel="stylesheet" type="text/css" href="style.css"> 7 <title>ProGuard Results</title> 8 <script type="text/javascript" language="JavaScript"> 9 <!-- 10 if (window.self==window.top) 11 window.top.location.replace("index.html#"+window.location.pathname+window.location.hash); 12 else { 13 var hash="#"+window.location.pathname.replace(window.top.location.pathname.replace("index.html", ""), ""); 14 if (window.top.location.hash!=hash) 15 window.top.location.hash=hash; 16 } 17 //--> 18 </script> 19 </head> 20 <body> 21 22 <h2>Results</h2> 23 24 <b>ProGuard</b> successfully processes any Java bytecode, ranging from small 25 midlets to entire run-time libraries. It primarily reduces the size of the 26 processed code, with some potential increase in efficiency as an added bonus. 27 The improvements obviously depend on the original code. The table below 28 presents some typical results: 29 <p> 30 31 <table> 32 33 <tr> 34 <th width="28%">Input Program</th> 35 <th width="12%">Original size</th> 36 <th width="12%">After shrinking</th> 37 <th width="12%">After optim.</th> 38 <th width="12%">After obfusc.</th> 39 <th width="12%">Total reduction</th> 40 <th width="12%">Time</th> 41 <th width="12%">Memory usage</th> 42 </tr> 43 44 <tr> 45 <td><a target="other" href="http://www.oracle.com/technetwork/java/javame/index,html">Worm</a>, a sample midlet from Oracle's JME</td> 46 <td align="center">10.3 K</td> 47 <td align="center">9.8 K</td> 48 <td align="center">9.6 K</td> 49 <td align="center">8.5 K</td> 50 <td align="center">18 %</td> 51 <td align="center">2 s</td> 52 <td align="center">19 M</td> 53 </tr> 54 55 <tr> 56 <td><a target="other" href="http://www.javadocking.com/">Javadocking</a>, a docking library</td> 57 <td align="center">290 K</td> 58 <td align="center">281 K</td> 59 <td align="center">270 K</td> 60 <td align="center">201 K</td> 61 <td align="center">30 %</td> 62 <td align="center">12 s</td> 63 <td align="center">32 M</td> 64 </tr> 65 66 <tr> 67 <td><b>ProGuard</b> itself</td> 68 <td align="center">648 K</td> 69 <td align="center">579 K</td> 70 <td align="center">557 K</td> 71 <td align="center">348 K</td> 72 <td align="center">46 %</td> 73 <td align="center">28 s</td> 74 <td align="center">66 M</td> 75 </tr> 76 77 <tr> 78 <td><a target="other" href="http://www.clarkware.com/software/JDepend.html">JDepend</a>, a Java quality metrics tool</td> 79 <td align="center">57 K</td> 80 <td align="center">36 K</td> 81 <td align="center">33 K</td> 82 <td align="center">28 K</td> 83 <td align="center">51 %</td> 84 <td align="center">6 s</td> 85 <td align="center">24 M</td> 86 </tr> 87 88 <tr> 89 <td><a target="other" href="ihttp://www.oracle.com/technetwork/java/javase/overview/index.html">the run-time classes</a> from Oracle's Java 6</td> 90 <td align="center">53 M</td> 91 <td align="center">23 M</td> 92 <td align="center">22 M</td> 93 <td align="center">18 M</td> 94 <td align="center">66 %</td> 95 <td align="center">16 min</td> 96 <td align="center">270 M</td> 97 </tr> 98 99 <tr> 100 <td><a target="other" href="http://tomcat.apache.org/">Tomcat</a>, the Apache servlet container</td> 101 <td align="center">1.1 M</td> 102 <td align="center">466 K</td> 103 <td align="center">426 K</td> 104 <td align="center">295 K</td> 105 <td align="center">74 %</td> 106 <td align="center">17 s</td> 107 <td align="center">44 M</td> 108 </tr> 109 110 <tr> 111 <td><a target="other" href="http://javancss.codehaus.org/">JavaNCSS</a>, a Java source metrics tool</td> 112 <td align="center">632 K</td> 113 <td align="center">242 K</td> 114 <td align="center">212 K</td> 115 <td align="center">152 K</td> 116 <td align="center">75 %</td> 117 <td align="center">20 s</td> 118 <td align="center">36 M</td> 119 </tr> 120 121 <tr> 122 <td><a target="other" href="http://ant.apache.org/">Ant</a>, the Apache build tool</td> 123 <td align="center">2.4 M</td> 124 <td align="center">401 K</td> 125 <td align="center">325 K</td> 126 <td align="center">242 K</td> 127 <td align="center">90 %</td> 128 <td align="center">23 s</td> 129 <td align="center">61 M</td> 130 </tr> 131 132 </table> 133 <p> 134 Results were measured with ProGuard 4.0 on a 2.6 GHz Pentium 4 with 512 MB 135 of memory, using Sun JDK 1.5.0 in Fedora Core 3 Linux. All of this technology 136 and software has evolved since, but the gist of the results remains the same. 137 <p> 138 The program sizes include companion libraries. The shrinking step produces the 139 best results for programs that use only small parts of their libraries. The 140 obfuscation step can significantly shrink large programs even further, since 141 the identifiers of their many internal references can be replaced by short 142 identifiers. 143 <p> 144 The Java 6 run-time classes are the most complex example. The classes perform 145 a lot of introspection, interacting with the native code of the virtual 146 machine. The 1500+ lines of configuration were largely composed by automated 147 analysis, complemented by a great deal of trial and error. The configuration 148 is probably not complete, but the resulting library successfully serves as a 149 run-time environment for running applications like ProGuard and the ProGuard 150 GUI. 151 <p> 152 For small inputs, timings are governed by the reading and parsing of the jars. 153 For large inputs, the optimization step becomes more important. For instance, 154 processing the Java 6 run-time classes without optimization only takes 2 155 minutes. 156 <p> 157 Memory usage (the amount of physical memory used by ProGuard while processing) 158 is governed by the basic java virtual machine and by the total size of the 159 library jars and program jars. 160 161 <hr /> 162 <noscript><div><a target="_top" href="index.html" class="button">Show menu</a></div></noscript> 163 <address> 164 Copyright © 2002-2013 165 <a target="other" href="http://www.lafortune.eu/">Eric Lafortune</a>. 166 </address> 167 168 </body> 169 </html> 170