You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Friponneau <fr...@hotmail.com> on 2010/10/13 22:29:32 UTC

EndOfEntityException & Performance in DEBUG

Xerces (3.11) naturally generates EndOfEntityException when reading XML
entities.  This exception is thrown in ReaderMgr::popReader(), at least one
for each entity. That's fine, except that the debug handling of those
exceptions by MSDEV takes way too much time (twice the time, in fact).  When
huge files are processed, execution becomes way too slow. So, I'm wondering
if there's a way of preventing those exceptions to be thrown by overriding
something somewhere in xerces.

The exception in question is thrown under the following conditions:

(prevEntity && (fThrowEOE || prevReaderThrowAtEnd))

Are any of these variable somehow "configurable" to force the no-exception
path and still get the job done?  I've looked at creating my own
EntityResolver, but that doesn't seem to do the trick, as the "wrapping"
default reader created by xerces makes it so that the prevReaderThrowAtEnd
is set to true...

(I'd even settle for some quick and dirty MSDEV trick that turns off the
DEBUG handling of those)

Thx,

d.

-- 
View this message in context: http://old.nabble.com/EndOfEntityException---Performance-in-DEBUG-tp29956646p29956646.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Re: how to compile Xerces-C++ 3.1.1 with MS Visual C++ 6.0 SP5

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Vikas,

Agrawal, Vikas <Vi...@rbccm.com> writes:

> Not possible to upgrade since my applications uses Infinity library that
> can not be compiled anything above VC++ 6.0

The Xerces-C++ project no longer supports VC++ 6.0. You can try one
of the older releases that still included the VC++ 6.0 project files.
I think the last such release was 3.0.0.

Boris


-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Compiler-based ORM system for C++      http://codesynthesis.com/products/odb
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde

RE: how to compile Xerces-C++ 3.1.1 with MS Visual C++ 6.0 SP5

Posted by "Agrawal, Vikas" <Vi...@rbccm.com>.
Not possible to upgrade since my applications uses Infinity library that
can not be compiled anything above VC++ 6.0 

-----Original Message-----
From: Friponneau [mailto:friponneau@hotmail.com] 
Sent: 15 October 2010 15:48
To: c-users@xerces.apache.org
Subject: Re: how to compile Xerces-C++ 3.1.1 with MS Visual C++ 6.0 SP5


Sorry, I'm afraid I can't help you with this, I'm using vc 9.0.21022.8
RTM. 
But vc6 is pretty ancient, I suggest you upgrade.


Agrawal, Vikas wrote:
> 
> 
> Could somebody please suggest how  to compile Xerces-C++ 3.1.1 with MS

> Visual C++ 6.0 SP5 ?
> 
> 

--
View this message in context:
http://old.nabble.com/EndOfEntityException---Performance-in-DEBUG-tp2995
6646p29972265.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.

_______________________________________________________________________

This email is intended only for the use of the individual(s) to whom
it is addressed and may be privileged and confidential.

Unauthorised use or disclosure is prohibited. If you receive this
e-mail in error, please advise immediately and delete the original
message without copying, using, or telling anyone about its contents.

This message may have been altered without your or our knowledge and
the sender does not accept any liability for any errors or omissions
in the message.

This message does not create or change any contract.  Royal Bank of
Canada and its subsidiaries accept no responsibility for damage caused
by any viruses contained in this email or its attachments.  Emails may
be monitored.

RBC Capital Markets is a business name used by branches and
subsidiaries of Royal Bank of Canada, including Royal Bank of Canada,
London branch and Royal Bank of Canada Europe Limited. In accordance
with English law requirements, details regarding Royal Bank of Canada
Europe Limited are set out below:

ROYAL BANK OF CANADA EUROPE LIMITED
Registered in England and Wales 995939
Registered Address: 71 Queen Victoria Street, London, EC4V 4DE.
Authorised and regulated by the Financial Services Authority.
Member of the London Stock Exchange


Re: how to compile Xerces-C++ 3.1.1 with MS Visual C++ 6.0 SP5

Posted by Friponneau <fr...@hotmail.com>.
Sorry, I'm afraid I can't help you with this, I'm using vc 9.0.21022.8 RTM. 
But vc6 is pretty ancient, I suggest you upgrade.


Agrawal, Vikas wrote:
> 
> 
> Could somebody please suggest how  to compile Xerces-C++ 3.1.1 with MS
> Visual C++ 6.0 SP5 ? 
> 
> 

-- 
View this message in context: http://old.nabble.com/EndOfEntityException---Performance-in-DEBUG-tp29956646p29972265.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


how to compile Xerces-C++ 3.1.1 with MS Visual C++ 6.0 SP5

Posted by "Agrawal, Vikas" <Vi...@rbccm.com>.
Could somebody please suggest how  to compile Xerces-C++ 3.1.1 with MS
Visual C++ 6.0 SP5 ? 

-----Original Message-----
From: Friponneau [mailto:friponneau@hotmail.com] 
Sent: 14 October 2010 21:17
To: c-users@xerces.apache.org
Subject: Re: EndOfEntityException & Performance in DEBUG


Well, I think I've been successful in changing the Xerces code to
prevent this.  Running my program, within or without an attached
debugger, now takes about the same time (90,000 monitored exceptions can
slow things down quite a bit).  However, I don't know what's involved in
issuing an official change to a package like Xerces, you know, licenses,
fine prints, "liars", et al.. 
But when I have some time I'll check to see if it can be done.

Thx,

d.


Boris Kolpackov-2 wrote:
> 
> Hi,
> 
> Friponneau <fr...@hotmail.com> writes:
> 
>> So, I'm wondering if there's a way of preventing those exceptions to 
>> be thrown by overriding something somewhere in xerces.
> 
> I don't think this is possible. It is pretty bad that we throw 
> exceptions during normal execution of the parser. If you would like to

> come up with a patch that fixes this, then that would be great.
> 
> Boris
> 
> -- 
> Boris Kolpackov, Code Synthesis       
> http://codesynthesis.com/~boris/blog
> Compiler-based ORM system for C++     
> http://codesynthesis.com/products/odb
> Open-source XML data binding for C++ 
> http://codesynthesis.com/products/xsd
> XML data binding for embedded systems 
> http://codesynthesis.com/products/xsde
> 
> 

--
View this message in context:
http://old.nabble.com/EndOfEntityException---Performance-in-DEBUG-tp2995
6646p29966300.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.

_______________________________________________________________________

This email is intended only for the use of the individual(s) to whom
it is addressed and may be privileged and confidential.

Unauthorised use or disclosure is prohibited. If you receive this
e-mail in error, please advise immediately and delete the original
message without copying, using, or telling anyone about its contents.

This message may have been altered without your or our knowledge and
the sender does not accept any liability for any errors or omissions
in the message.

This message does not create or change any contract.  Royal Bank of
Canada and its subsidiaries accept no responsibility for damage caused
by any viruses contained in this email or its attachments.  Emails may
be monitored.

RBC Capital Markets is a business name used by branches and
subsidiaries of Royal Bank of Canada, including Royal Bank of Canada,
London branch and Royal Bank of Canada Europe Limited. In accordance
with English law requirements, details regarding Royal Bank of Canada
Europe Limited are set out below:

ROYAL BANK OF CANADA EUROPE LIMITED
Registered in England and Wales 995939
Registered Address: 71 Queen Victoria Street, London, EC4V 4DE.
Authorised and regulated by the Financial Services Authority.
Member of the London Stock Exchange


Re: EndOfEntityException & Performance in DEBUG

Posted by Friponneau <fr...@hotmail.com>.
Well, I think I've been successful in changing the Xerces code to prevent
this.  Running my program, within or without an attached debugger, now takes
about the same time (90,000 monitored exceptions can slow things down quite
a bit).  However, I don't know what's involved in issuing an official change
to a package like Xerces, you know, licenses, fine prints, "liars", et al.. 
But when I have some time I'll check to see if it can be done.

Thx,

d.


Boris Kolpackov-2 wrote:
> 
> Hi,
> 
> Friponneau <fr...@hotmail.com> writes:
> 
>> So, I'm wondering if there's a way of preventing those exceptions to be
>> thrown by overriding something somewhere in xerces.
> 
> I don't think this is possible. It is pretty bad that we throw exceptions
> during normal execution of the parser. If you would like to come up with
> a patch that fixes this, then that would be great.
> 
> Boris
> 
> -- 
> Boris Kolpackov, Code Synthesis       
> http://codesynthesis.com/~boris/blog
> Compiler-based ORM system for C++     
> http://codesynthesis.com/products/odb
> Open-source XML data binding for C++  
> http://codesynthesis.com/products/xsd
> XML data binding for embedded systems 
> http://codesynthesis.com/products/xsde
> 
> 

-- 
View this message in context: http://old.nabble.com/EndOfEntityException---Performance-in-DEBUG-tp29956646p29966300.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Re: EndOfEntityException & Performance in DEBUG

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi,

Friponneau <fr...@hotmail.com> writes:

> So, I'm wondering if there's a way of preventing those exceptions to be
> thrown by overriding something somewhere in xerces.

I don't think this is possible. It is pretty bad that we throw exceptions
during normal execution of the parser. If you would like to come up with
a patch that fixes this, then that would be great.

Boris

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Compiler-based ORM system for C++      http://codesynthesis.com/products/odb
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde