Torsten Curdt wrote:
And in theory ProGuard should do that just fine ...but I fear the point is that ProGuard cannot really find the stuff that you don't want or need unless we split the core further down into smaller chunks.
So you suggest to further modularize the core?
Modularizing is just a matter of reorganizing Jars, which proguards doesn't care about :-)
To use a shrinker efficiently, you have to tell him all class names that are loaded dynamically (can be automated by analyzing cocoon.xconf and the sitemap) and the entry points of your application (i.e. CocoonServlet.service).
The shrinker then crawls the call graph and removes everything that's not in that graph: classes, but also methods and attributes. Proguard can also optionally do some nastier tricks by changing attributes visibility to public and inline getter/setter call to further reduce the code size.
Sylvain
-- Sylvain Wallez Anyware Technologies http://apache.org/~sylvain http://anyware-tech.com Apache Software Foundation Member Research & Technology Director
