Hi Davide,

I would suggest running your program under valgrind with kcallgrind and 
profiling the execution.  When you view the results, you should see where the 
hotspots are.

Based upon my previous profiling experiments, I suspect you'll find that over 
50% of the runtime is spent in the transcoder doing UTF-8 to UTF-16 conversions 
(and vice-versa).

If this is the case, I would suggest trying a different transcoder and 
reprofiling.  This may be where the Windows performance difference lies.  An 
additional optimisation would be to reduce the number of conversions.  For 
example, if you are repeatedly transcoding a UTF-8 string for use with a 
function requiring UTF-16, you can cache the conversion.  Or use char16_t with 
u16 string literals.  At the expense of portability with older compilers.

Kind regards,
Roger

> -----Original Message-----
> From: Davide Capodaglio <davide.capodag...@axelsw.it>
> Sent: 20 July 2022 14:44
> To: c-users@xerces.apache.org
> Subject: Xerces-C++ and XQilla bad performance
> 
> Is there any known way to optimize the performance of Xerces-C++ and
> XQilla in both loading and XPath execution?

Reply via email to