Yes and no... If you only use one parser instance to parse a document, then yes - the single threaded build will always be faster, since it does not require the overhead of locking/unlocking mutual exclusion objects.
 
These synchronisation objects are only required to protect global data from beeing corrupted if you have multiple parsers running in multiple threads.
 
It's up to the application using Xerces-C++ to benefit from parsing in separate threads. If your application is single-threaded it is pointless compiling Xerces-C++ to be thread safe. (And, as you say, you will even get a performance loss.)
 
Regards,
 Martin
----- Original Message -----
Sent: Monday, April 08, 2002 11:58 PM
Subject: Single threaded built faster then Multithreaded??

hi,
 
I was comparing Single threaded Xerces built v/s the Multithreaded built and surprisingly find that the Single Threaded built has much less elapsed time. I am parsing same file using DOM Parser.
 
I am just wondering if I am doing something wrong, or is this behaviour expected.
 
Thanx
Ritesh

Reply via email to