From: Andrea A. <aa...@op...> - 2009-07-10 06:40:57
|
Gabriel Roldan ha scritto: > I would hold horses before even thinking on switching xsd libraries, > that'd be just too much work. If we let the profiler speak though, it > doesn't seem like the biggest offender is EMF XSD itself, but our (my) > own code. For example, if I run _only_ the FeatureChainingTest mappings > load method through the profiler (that is, parsing the mappins, the xsd > schemas to EMF XSD and the EMF XSD model to > FeatureType/AttributeDescriptor), it needs 74M Heap space. But if I omit > the last step (that is, parsing the mappins and the xsd schemas to EMF > XSD, omiting the transformation from EMF model to > FeatureTypes/AttribtueDescriptors), it only needs 22M Heap. Yep, our objects are very heavy and likely for a simple reason: heavy use of hashmaps. Hashes are quite likely the most memory intensive collection in Java, indiscriminate use of it leads to higher memory consumption. Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. |