Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 32013 invoked by uid 500); 18 Apr 2001 19:47:06 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 31978 invoked from network); 18 Apr 2001 19:47:03 -0000 Received: from whale.cs.indiana.edu (129.79.246.27) by h31.sny.collab.net with SMTP; 18 Apr 2001 19:47:03 -0000 Received: from cs.indiana.edu (whale.cs.indiana.edu [129.79.246.27]) by whale.cs.indiana.edu (8.9.3/8.9.3/IUCS_2.31) with ESMTP id OAA22652; Wed, 18 Apr 2001 14:47:05 -0500 (EST) Message-ID: <3ADDEFE2.72F84489@cs.indiana.edu> Date: Wed, 18 Apr 2001 14:49:54 -0500 From: Aleksander Slominski X-Mailer: Mozilla 4.74 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: axis-dev@xml.apache.org Subject: Re: Timings for processing of small messages References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Sam Ruby wrote: > OK, I'll translate my question into english...was this with or without > FixedLengthInputStream? it was exactly following other test template (so it was without FixedLengthInputStream) or otherwise i would be breaking test assumptions (or comparing apples to oranges). i have put in FixedLengthInputStream as i started looking on how to write keep-alive test but i did not finish it (it is working but no keep-alive). > Yes, socket opening/closing is a lot of overhead. My original intent of > this test was to measure latency or response time to SOAP messages. It > would be easy enough to remove all client, socket, and other processing on > the front end, and for that matter all non-parsing related backend and just > compare parsers, but that is most definately NOT what I wanted to do. i think it is very valuable to test for real situations but i think also that keep-alive should be very typical in SOAP/HTTP usage... > Bottom line: if the xml parsing is a big part of the overall equation, I > want to optimize that component. Otherwise, I want to optimize where the > time is actually being spent. i agree completely - so maybe conclusion from this test is to optimize network IO? and then to look on XML parsing? > if (element.equals(match)) { > result = new String(ch, start, length); > } it is doing exactly the same in XPP - cut and paste from SimpleXppSoapServer.java: String param1Value = pp.readContent(); and if you check XML Pull Parser source code you can see new String(...) happening in readContent: (...) public String readContent() throws XmlPullParserException { if(eventType != CONTENT) throw new XmlPullParserException("no content available to read"); if(elContent == null) { if(tokenizer.parsedContent) { elContent = new String(tokenizer.pc, tokenizer.pcStart, tokenizer.pcEnd - tokenizer.pcStart); } else { elContent = new String(tokenizer.buf, tokenizer.posStart, tokenizer.posEnd - tokenizer.posStart); } } return elContent; } BTW: you make an assumption that SAX processor in characters() callback is giving you whole element value in ch[] buffer (it is normally true if value is just number but xerces will have multiple charcters() callbacks for each entity such as text with & even though some SAX drivers may guarantee to give you one characters() callback and that what is done in XPP/SAX you should not make SAX code depend on it...) so i think that SAX test should look like this: public class SimpleSaxSoapServer (...) StringBuffer resultBuf = new StringBuffer(); boolean matched; public void startElement(String uri, String localName, String qname, Attributes atts) { element = localName; matched = element.equals(match) ; // ASSERT: there is only one match! // or otherwise necessary to reset resultBuf on each matched element or signal error... } public void characters(char[] ch, int start, int length) { if (matched) { resultBuf.append(new String(ch, start, length)); } } public void endElement(String uri, String localName, String qname) { element = ""; if(matched) { result = resultBuf.toString(); } } (...) thanks, alek -- Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom As I look afar I see neither cherry Nor tinted leaves Just a modest hut on the coast In the dusk of Autumn nightfall - Fujiwara no Teika(1162-1241)