>>> However, it does not make sense to duplicate what we already have for
>>> free, either.
>>> If it's not too much trouble, why not remove those as well?
>>>
>>
>> +1 - seems like removing them could help more with like our weird memory
>> bloat more than the actual download size no?

Just so everyone is clear about permgen and jars in the classpath (at
least on the oracle vm):
  if a class is not loaded (it's in a jar but never referenced in
executing code), it will take up no (consequential) memory

The only overhead from a jar being on the classpath (without being
actually used directly) is service (META-INF) and spring context
scanning, but jar info is cached in the standard java classloader and
zip access is fast, so this shouldn't be a primary concern.

Other stuff about permgen:
- permgen growth is not predictable - classes do not appear to end up
there immediately upon load
- permgen size per class may vary over time as code is compiled (code
is only compiled once it has run a certain number of times)

> I actually didn't measure any noticeable difference after removing xerces,
> although I was only trying to measure permgen overhead which unfortunately
> doesn't give you any information about individual class sizes.

At the moment, it doesn't seem to be possible to trace permgen size of
a given class.

The best rules to reduce permgen bloat are:
1) reduce the number of classes and interfaces loaded, whether real or
proxy or otherwise
2) have simpler, smaller methods that result in less byte code and
therefore simple/smaller compiled code
3) make sure classes aren't loaded twice (either via difference
classloaders - probably not an issue here)

With respect to xerces, checking a geoserver heap dump, it is indeed
loaded twice - once from the xerces jar, once from the sun
repackaging. This should result in something, but will be hard to
measure.

Either way, I'm a fan of removing things not needed :)

-- 
Ian Schneider
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to