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