You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Brian Quinlan <Br...@ActiveState.com> on 2001/03/14 19:13:04 UTC

Xerces continuing on fatal error question

Hi,

I am using Xerces to validate XML files and I would like the parser to
continue even after it encounters a fatal error. I am using a SAX2XMLReader
object to read the file, which creates a XMLScanner to scan the file.
XMLScanner has a nice convenient method called setExitOnFirstFatal( ), which
I would like to call. However, SAX2XMLReaderImpl doesn't allow me access to
the XMLScanner instance.

It would be convenient if Xerces did allow one to access the XMLScanner
instance but I have found no way of doing so.

Any thoughts?

Cheers,
Brian

--
Brian Quinlan
Python and XSLT Developer
BrianQ@ActiveState.com

Use the power of the dragon for your programming needs.
Download Komodo, our Mozilla-based, cross-platform IDE.
      http://www.ActiveState.com/Komodo




---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: Xerces multithreaded performance

Posted by Lyle Coder <x_...@hotmail.com>.
I'm sorry... I did mean Xerces -C.  Does your implementation work with Xalan
(C) well?

Thanks
Lyle
----- Original Message -----
From: "Andy Heninger" <an...@jtcsv.com>
To: <ge...@xml.apache.org>
Sent: Friday, March 16, 2001 9:25 AM
Subject: Re: Xerces multithreaded performance


> You don't say whether you  are using xerces-c or xerces-j.
> But the Xerces-C DOM does have the scalability problems that
> you are seeing.
>
> I've prototyped an alternative DOM implementation that
> works better in multithreaded environments on SMP machines.
> More info on this is at http://www.apache.org/~andyh/
>
> Andy Heninger
> IBM XML Technology Group, Cupertino, CA
> heninger@us.ibm.com
>
>
> ----- Original Message -----
> From: "Lyle Coder" <x_...@hotmail.com>
> To: <ge...@xml.apache.org>
> Sent: Thursday, March 15, 2001 12:03 AM
> Subject: Xerces multithreaded performance
>
>
> > Hi,
> > I am using the Xerces DOM API.  When I am creating DOMs simultaneously
> via
> > different threads, I have a serious performance bottle neck.  Many
> times, my
> > application just STALLS and I use GDB to break in and see where the
> stall is
> > and it is ALWAYS in Xerces where I am calling some Xerces allocation
> > function like
> > XercesElement->createElement()
> >
> > I mean... I get better performance with just one thread.  And if you are
> > wondering, my code does not hold any locks at all (no semaphores), so I
> know
> > it is not my program thats the bottle neck
> >
> > So the question is, has any one else seen this, and if so, do you have a
> > solution
> >
> > Thanks
> > Lyle
> >
>
>
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: Xerces multithreaded performance

Posted by Andy Heninger <an...@jtcsv.com>.
You don't say whether you  are using xerces-c or xerces-j.
But the Xerces-C DOM does have the scalability problems that
you are seeing.

I've prototyped an alternative DOM implementation that
works better in multithreaded environments on SMP machines.
More info on this is at http://www.apache.org/~andyh/

Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com


----- Original Message -----
From: "Lyle Coder" <x_...@hotmail.com>
To: <ge...@xml.apache.org>
Sent: Thursday, March 15, 2001 12:03 AM
Subject: Xerces multithreaded performance


> Hi,
> I am using the Xerces DOM API.  When I am creating DOMs simultaneously
via
> different threads, I have a serious performance bottle neck.  Many
times, my
> application just STALLS and I use GDB to break in and see where the
stall is
> and it is ALWAYS in Xerces where I am calling some Xerces allocation
> function like
> XercesElement->createElement()
>
> I mean... I get better performance with just one thread.  And if you are
> wondering, my code does not hold any locks at all (no semaphores), so I
know
> it is not my program thats the bottle neck
>
> So the question is, has any one else seen this, and if so, do you have a
> solution
>
> Thanks
> Lyle
>



---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Xerces multithreaded performance

Posted by Lyle Coder <x_...@hotmail.com>.
Hi,
I am using the Xerces DOM API.  When I am creating DOMs simultaneously via
different threads, I have a serious performance bottle neck.  Many times, my
application just STALLS and I use GDB to break in and see where the stall is
and it is ALWAYS in Xerces where I am calling some Xerces allocation
function like
XercesElement->createElement()

I mean... I get better performance with just one thread.  And if you are
wondering, my code does not hold any locks at all (no semaphores), so I know
it is not my program thats the bottle neck

So the question is, has any one else seen this, and if so, do you have a
solution

Thanks
Lyle


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: Xerces continuing on fatal error question

Posted by Andy Clark <an...@apache.org>.
Brian Quinlan wrote:
> And I doing something stupid? I'm thinking about just implementing
> SAX2XMLReader::setExitOnFirstFatalError in my copy of Xerces.

Nope, I'm the stupid one. I thought we were talking about
Xerces-J. Can anyone using Xerces-C answer this?

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


RE: Xerces continuing on fatal error question

Posted by Brian Quinlan <Br...@ActiveState.com>.
SAXParser has a method to do so (setExitOnFirstFatalError), but
SAX2XMLReader no longer subclasses SAXParser and does not implement this
method. All of the methods defined by SAX2XMLReader are described at:

http://xml.apache.org/xerces-c/apiDocs/class_SAX2XMLReader-members.html

And I doing something stupid? I'm thinking about just implementing
SAX2XMLReader::setExitOnFirstFatalError in my copy of Xerces.

-----Original Message-----
From: Andy Clark [mailto:andyc@apache.org]
Sent: Thursday, March 15, 2001 11:32 AM
To: general@xml.apache.org
Subject: Re: Xerces continuing on fatal error question


Brian Quinlan wrote:
> It would be convenient if Xerces did allow one to access the XMLScanner
> instance but I have found no way of doing so.

Check the features documentation. There's a setting you can
call on the parser to continue after fatal errors. Use at
your own risk, though!

--
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: Xerces continuing on fatal error question

Posted by Andy Clark <an...@apache.org>.
Brian Quinlan wrote:
> It would be convenient if Xerces did allow one to access the XMLScanner
> instance but I have found no way of doing so.

Check the features documentation. There's a setting you can
call on the parser to continue after fatal errors. Use at
your own risk, though!

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org