Hi, Performance of MarshallingContext and its unmarshalling friend are really poor compared to the effort done on the rest of JIBX. It's not noticeable for large objects, but for small ones, between 50% and 75% of the marsh/unmarsh time is taken by those classes.
Marshalling: loadClass result should be cached in an array inside the factory (shared cache between MarshallingContext). I've updated the binding generation to add this array of null to the factory, passed to the MashallingContext constructor (support null for backward compat). Class object is cached in factory only if loaded from the factory classloader. Result being a 50% performance increase for small objects. Unmarshalling (improvement from marshalling above applies too): for small objects unmarshalled from big factories, the time taken to build the cache map is really BIG (and useless). If you supposed that all node names are intern'ed String (all litteral Strings are, and programmatically added ones can be intern'ed), then it's much more efficient to search the array directly with == comparison (and not .equals) after calling intern() on the given string (which is probably already intern'ed by xpp). In fact even for large objects in large factories, it's still more efficient (we're talking about a hashmap of arraylists/integer built every time I unmarshal a single object here). Let me know your thoughts about those, and I'll gladly share them with the community. My next move will be to cache the (un)marshallers themselves (maybe not reset them in context reset). I know that's dangerous for external (custom) (un)marshallers (even if I don't use any that can't be re-used), so I'll try to find a solution for that too (maybe a two layer cache, one for JIBX generated ones, re-usables, and one (lazily built and reset) for others). That's my 2 cents on JIBX, which is already a great framework. Thanks for reading. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users