On any project that runs Castor XML objects through a series of mapping files that rarely change, or the mappings for which will be used more than once (e.g., most situations), cache the mappings.

Once the mapping itself is cached, you've taken out the majority of the work in performing the XML operation. Reuse of the same mapping should dramatically improve performance.

Always, always, always reuse your mappings. Never, never, never use the static marshal/unmarshal methods, and always, always, always roll your own for good performance and control.

(as always, IMO.)

We've wrapped marshalling and unmarshalling in a framework that gives us config-level control over the process of marshalling and unmarshalling for a given operation, including the loading and caching of the mapping file; we even check for changes to the file on a periodic basis and reload and recache the mapping.

Works fine.

On 2 Aug 2005, at 10:55, Mesut Celik wrote:

I use CastorXML and have some implementation over it right now.
I did a test yesterday to see how performant castor within a
multithreaded enviroment and saw it needs some improvement.

When i run a unmarshaller for a single thread everything ok but If I
start 5 threads which does the same unmarshalling operation with
different unmarshaller objects It gave me a bad performance results
and then I applied to a java profiler. profiler showed me that
Mapping.getResolver method which is synchronized is the bottleneck
part of the performance issue...

have you had any experience with that issue?

mesut


On 8/2/05, Ralf Joachim <[EMAIL PROTECTED]> wrote:

Hi Mesut,

which part of castor do you intend to use in multithreaded environment:
CastorXML or CastorJDO?

Ralf


Mesut Celik schrieb:

Hi all,

have you ever used Castor within Multithreaded enviroment? Do you know an article or some other resource about the performance of Castor in a
multithreaded project?

regards,
mesut

-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------


-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------




-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------




-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to