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