I am using latest versions, Xerces-C++ 3.2.3 and XQilla 2.3.4.
So probably I am seeing the dynamic_cast impact (but I can not do anything 
obviously).

I am using no schema, no validation, no namespaces.
Thanks
Davide


> -----Messaggio originale-----
> Da: Vitaly Prapirny <vitaly.prapi...@gmail.com>
> Inviato: giovedì 21 luglio 2022 10:46
> A: c-users@xerces.apache.org
> Oggetto: Re: Xerces-C++ and XQilla bad performance
> 
> Hi Davide,
> 
> Other factors affecting xerces performance are xerces version (
> https://issues.apache.org/jira/browse/XERCESC-2211) and usage of
> validation (https://xerces.apache.org/xerces-c/schema-3.html).
> 
> Good luck!
>    Vitaly
> 
> 
> On Thu, Jul 21, 2022 at 11:34 AM Davide Capodaglio <
> davide.capodag...@axelsw.it> wrote:
> 
> > Hi Roger,
> > I already tried to compile xerces with ICU but it makes no difference
> > at all.
> > However on Windows platform also MSXML internally converts all to
> > UTF-16 (because everything on Windows nowadays uses Unicode with
> > wchar_t=UTF-16), and Xerces uses internal Windows API, but I see more
> > than a 2x slowdown then MSXML for a just a load of a document.
> >
> > But, as I said my big performance problem is with XQilla queries.
> >
> > Also in my benchmarks of the selectNodes() I am already specifying u16
> > literals.
> >
> > I will try to use valgrind, but I have very few hopes at the moment...
> >
> > Thanks
> > Davide
> >
> >
> > > -----Messaggio originale-----
> > > Da: Roger Leigh <rle...@codelibre.net>
> > > Inviato: giovedì 21 luglio 2022 01:49
> > > A: c-users@xerces.apache.org
> > > Oggetto: RE: Xerces-C++ and XQilla bad performance
> > >
> > > 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