473,670 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can XML-RPC performance be improved?

I've got an established client-server application here where there
is now a need to shovel huge amounts of data (structured as lists of
lists) between the two, and the performance bottleneck has become
the amount of time spent parsing XML (it's taking 100% CPU on one or
other end of the connection and accounting for well over 50% of the
total call time, to the extent that it's having a greater impact on
performance than user interaction). And this is using SGMLOP for
parsing -- I dread to think what it would be like with a slower
parser. Anyone (Fredrik?) got any good ideas for tackling this
problem?

--
\S -- si***@chiark.gr eenend.org.uk -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
Mar 21 '06 #1
15 5548
Sion Arrowsmith wrote:
I've got an established client-server application here where there
is now a need to shovel huge amounts of data (structured as lists of
lists) between the two, and the performance bottleneck has become
the amount of time spent parsing XML (it's taking 100% CPU on one or
other end of the connection and accounting for well over 50% of the
total call time, to the extent that it's having a greater impact on
performance than user interaction). And this is using SGMLOP for
parsing -- I dread to think what it would be like with a slower
parser. Anyone (Fredrik?) got any good ideas for tackling this
problem?


CORBA. Or TCP/IP directly. I know that isn't really the answer you're
looking for - but there is an overhead parsing XML, and that can't go away.
From what I read at SGMLOP's site I doub't that you can get much faster -
because speed comes with sacrificing standard compliancy, which it already
seems to do.

Regards,

Diez
Mar 21 '06 #2
Perhaps there's a hardware solution? Could you run more servers in
parallel? Or have some sort of load distribution system?

(Just some generic server tips, I don't know much about XML-RPC)

-Greg
On 3/21/06, Diez B. Roggisch <de***@nospam.w eb.de> wrote:
Sion Arrowsmith wrote:
I've got an established client-server application here where there
is now a need to shovel huge amounts of data (structured as lists of
lists) between the two, and the performance bottleneck has become
the amount of time spent parsing XML (it's taking 100% CPU on one or
other end of the connection and accounting for well over 50% of the
total call time, to the extent that it's having a greater impact on
performance than user interaction). And this is using SGMLOP for
parsing -- I dread to think what it would be like with a slower
parser. Anyone (Fredrik?) got any good ideas for tackling this
problem?


CORBA. Or TCP/IP directly. I know that isn't really the answer you're
looking for - but there is an overhead parsing XML, and that can't go away.
From what I read at SGMLOP's site I doub't that you can get much faster -

because speed comes with sacrificing standard compliancy, which it already
seems to do.

Regards,

Diez
--
http://mail.python.org/mailman/listinfo/python-list

--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
Mar 21 '06 #3
Sion Arrowsmith:
I've got an established client-server application here where there
is now a need to shovel huge amounts of data (structured as lists of
lists) between the two, and the performance bottleneck has become
the amount of time spent parsing XML
http://xmlsucks.org/
Anyone got any good ideas for tackling this problem?


cPickle.
http://docs.python.org/lib/module-cPickle.html

--
René Pijlman

Wat wil jij leren? http://www.leren.nl
Mar 21 '06 #4
Sion Arrowsmith wrote:
I've got an established client-server application here where there
is now a need to shovel huge amounts of data (structured as lists of
lists) between the two, and the performance bottleneck has become
the amount of time spent parsing XML (it's taking 100% CPU on one or
other end of the connection and accounting for well over 50% of the
total call time, to the extent that it's having a greater impact on
performance than user interaction). And this is using SGMLOP for
parsing -- I dread to think what it would be like with a slower
parser. Anyone (Fredrik?) got any good ideas for tackling this
problem?


the cElementTree unmarshaller on this page

http://effbot.org/zone/element-iterp...ental-decoding

is a bit faster than the one in xmlrpclib. (to get more performance,
you probably need a library that allows you to register decoders on
the C level.)

</F>

Mar 21 '06 #5
Sion Arrowsmith wrote:
shovel huge amounts of data


That right there basically takes XML-RPC off the table as a viable
solution. No matter how much fine tuning you try large amounts of data
don't bode well using XML-RPC. The other posted alternatives are
certainly worth a shot. From CORBA to cPickle to even a basic TCP
socket connection would be more efficient. I have used XML-RPC for very
small recordset transfers but I wouldn't use it for anything large.

Mar 21 '06 #6

"Diez B. Roggisch" <de***@nospam.w eb.de> wrote in message
news:48******** ****@uni-berlin.de...
Sion Arrowsmith wrote:
I've got an established client-server application here where there
is now a need to shovel huge amounts of data (structured as lists of
lists) between the two, and the performance bottleneck has become
the amount of time spent parsing XML (it's taking 100% CPU on one or
other end of the connection and accounting for well over 50% of the
total call time, to the extent that it's having a greater impact on
performance than user interaction). And this is using SGMLOP for
parsing -- I dread to think what it would be like with a slower
parser. Anyone (Fredrik?) got any good ideas for tackling this
problem?


CORBA. Or TCP/IP directly.

<snip>

Beware, CORBA marshaling/unmarshaling can be similarly deadly, especially if
you are passing Any's and have to marshal complex type codes. But if you
are just sending arrays of octets, or strings of chars, then CORBA
marshal/unmarshal will be quite fast.

Of course, something will have to convert that array to meaningful data
*somewhere*! You can't really eliminate software complexity, you can only
move it around. (not original, I'm quoting Chris Stone, founder of the OMG.
Also from Chris Stone - "I finally came up with a good definition for
middleware. Middleware is the software nobody wants to pay for.")

-- Paul


Mar 21 '06 #7

Diez> Sion Arrowsmith wrote:
I've got an established client-server application here where there
is now a need to shovel huge amounts of data (structured as lists of
lists) between the two, and the performance bottleneck has become
the amount of time spent parsing XML ...
Diez> CORBA. Or TCP/IP directly. I know that isn't really the answer
Diez> you're looking for - but there is an overhead parsing XML, and
Diez> that can't go away.

Ah, but if both ends of the pipe happen to be running Python, you can
cheat. ;-) Run your list through marshal.dumps() before passing it to
xmlrpclib, then undo the marshalling on the other end.
biglist = ["abc"] * 50
biglist = [biglist] * 50
import xmlrpclib
import marshal
x = xmlrpclib.dumps ((biglist,))
len(x) 92331 x.count("<") 10310 y = xmlrpclib.dumps ((marshal.dumps (biglist),))
len(y) 20324 y.count("<")

8

If you can swing it, I'd be willing to bet you a beer your XML parsing time
will all but disappear.

If you're not using xmlrpclib with some sort of C helper (like sgmlop), try
that as well. Big difference parsing XML in C and Python.

Skip
Mar 21 '06 #8
gregarican wrote:
Sion Arrowsmith wrote:

shovel huge amounts of data

That right there basically takes XML-RPC off the table as a viable
solution. No matter how much fine tuning you try large amounts of data
don't bode well using XML-RPC. The other posted alternatives are
certainly worth a shot. From CORBA to cPickle to even a basic TCP
socket connection would be more efficient. I have used XML-RPC for very
small recordset transfers but I wouldn't use it for anything large.

<rant>
I am continually surprised that the industry as a whole has become so
enamoured of XML that people persist in using it for tasks it was never
designed nor intended to be used for.
</rant>

I suppose there *was* a good reason for using XML-RPC in the first place?

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Love me, love my blog holdenweb.blogs pot.com

Mar 21 '06 #9

Steve> I suppose there *was* a good reason for using XML-RPC in the
Steve> first place?

I don't know about the OP, but in my case it was a drop-dead simple
cross-language RPC protocol. At one point Mojam's XML-RPC server talked to
clients written in Python, Perl and Objective-C (via a Java bridge, no
less).

Skip

Mar 21 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2251
by: Phil Powell | last post by:
// PROCESS XML CONTENT INTO DYNAMICALLY-NAMED ARRAYS foreach (array('mime', 'state', 'country') as $val) { $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, ${$val . 'XML'}, ${$val . 'XMLArray'}, $tags); xml_parser_free($parser); $myXMLArray = ${$val . 'XMLArray'}; for ($i = 1; $i < @sizeof($myXMLArray) - 1; $i++) { if ($myXMLArray) {
8
2344
by: Robert J Egan | last post by:
Hi i'm trying to search a remote website page. The form returns xml information, though the page extension is missing. I retrieve the information and write it to the screen. So far so good - However i cannot format this information in anyway. A copy of the returned information saved to my server results in the xml data being formatted and displayed as intended! Can anyone explain to me why one would work but not the other. Regards ...
0
1751
by: Stylus Studio | last post by:
World's Most Advanced XML Schema Editor Adds Support for IBM AlphaWorks XML Schema Quality Checker to Improve XML Schema Style and Quality BEDFORD, MA -- 09/13/2005 -- Stylus Studio (http://www.stylusstudio.com), the industry-leading provider of XML development tools for advanced data integration, today announced new support for IBM's alphaWorks XML Schema Quality Checker, furthering solidifying its position as the provider of the...
5
4203
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple values in the where clause as below
0
2784
by: jts2077 | last post by:
I am trying to create a large nested XML object using E4X methods. The problem is the, the XML I am trying to create can only have xmlns set at the top 2 element levels. Such as: <store xmlns="http://www.store.com/xml/1.1.0.0/impex/catalog"> <product sku="10050-1653" xmlns="http://www.store.com/xml/1.1.0.0/impex/catalog"> <sku>10050-1653</sku> <name xml:lang="x-default">shop's Foie Gras</name> <online>1</online> ...
0
2226
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): PERL5LIB=/Users/Ric/Library/Perl/ ls XML-Parser-2.34/ XML-Parser-2.34.tar
9
2476
by: Lie | last post by:
Why this generates AttributeError, then not? Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'dom' <module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'>
10
15569
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I had a program and it always works fine and suddenly it gives me the following message when a pass a xml file to our server program: error code: -1072896680 reason: XML document must have a top level element. line #: 0 I don't know if it is my xml file or it is something else? Here is my client side program: <%@ Language=vbScript%>
0
2166
by: Jacker | last post by:
Xpress Author for MS Word XML Documents In.vision Research empowers knowledge workers to create complex XML documents in Microsoft Word (2000-2003) with a normal Word experience. Deploy XML authoring across the enterprise. http://e.goozw.com/xml.htm Powerful XML Editing Tool - XMLSPY XMLSPY is a powerful XML tool for editing XML documents, XML schema, DTDs, XSL/XSLT stylesheets, SOAP applications, debugging Web services and more....
0
8468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8591
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7415
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5683
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4209
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2799
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1792
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.