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