Return-Path: Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 11767 invoked by uid 500); 21 Feb 2003 02:10:44 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 11757 invoked from network); 21 Feb 2003 02:10:43 -0000 Message-ID: <3E558A7F.8080108@cs.indiana.edu> Date: Thu, 20 Feb 2003 21:10:07 -0500 From: Aleksander Slominski User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126 X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-user@ws.apache.org Subject: Re: Why Pull-Parser faster ? - Still NO answer References: <4.3.2.7.2.20030220174947.02eb5830@franklin.cisco.com> In-Reply-To: <4.3.2.7.2.20030220174947.02eb5830@franklin.cisco.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ricky Ho wrote: > Just between SAX and XPP .... > > If SAX can be stopped anytime by throwing an exception, this means the > application can control when to stop. And if XPP is not skipping > whitespace ... > > Why XPP is faster than SAX ?? hi, not sure if these two can be compared. SAX is just an API with many implementations. XPP2 is also API (with two implementations) and XmlPull API has 3 implementations (and XPP3 is one of them). even if you run some tests (like http://www.extreme.indiana.edu/~aslom/xpp_sax2bench/results.html) how it will work for you will ultimately depend on implementation used, hardware and software environment (OS, memory, CPU, version of Java), your application and on what XML input you are processing. however i guess your question is if there is something in XML push or pull parsing (SAX or XmlPull are just examples of such APIs) that would make one faster than another? i think that both APIs have similar performance capabilities and choice to use push or pull parsing should be dictated by you need to use streaming parsing (if you do not want streaming than maybe some DOM-like API is better) and how your application is processing XML. i would say that for if you need to do filtering and/or use state machines then push parsing code is easier and when you need to convert XML to other representation pull parsing code is more natural IMHO - i have discussed some of those issues and some others in this technical report: http://www.extreme.indiana.edu/xgws/papers/xml_push_pull/ where i makes point that pull and push are actually complementary approaches and can be used *together* even on the same input (it describes XPP2 API but most of it applies to XmlPull API as well). hope you find it useful in addressing your concerns. thanks, alek -- "Mr. Pauli, we in the audience are all agreed that your theory is crazy. What divides us is whether it is crazy enough to be true." Niels H. D. Bohr