473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

xml-rpc

Newbie using xmlrpclib
Curious about why the same very simple xml-rpc demo code should execute
quickly under python2.1 but very slowly under python2.3

python2.1 ~4 seconds
python2.3 ~24 seconds on the same machine

Is there a well known reason for the difference?

Here's the code:
-----------------------------------------------------------------------------
from xmlrpclib import *
import sys
server = Server("http://wmich.freeshell.org/betty.php")
try:
print "Got '" + server.examples.getStateName(32) + "'"
print "----------------------------------------------------"
r = server.examples.echo('Three "blind" mice - ' + "See 'how' they run")
print r
print "--------------------------------------------"
# name/age example. this exercises structs and arrays
a = [ {'name': 'Dave', 'age': 35}, {'name': 'Edd', 'age': 45 },
{'name': 'Fred', 'age': 23}, {'name': 'Barney', 'age': 36 }]
r = server.examples.sortByAge(a)
print r
print "---------------------------------------------"
except Error, v:
print "XML-RPC Error:",v
------------------------------------------------------------------------------
Thanks,
Walt
Jul 18 '05 #1
2 1282

Walt> Curious about why the same very simple xml-rpc demo code should
Walt> execute quickly under python2.1 but very slowly under python2.3

Walt> python2.1 ~4 seconds
Walt> python2.3 ~24 seconds on the same machine

Walt> Is there a well known reason for the difference?

Nope. I tweaked your script to contact my XML-RPC server over the net
(about 20-30ms ping times between client and server) and just make
server.echo() calls. It took between 1.6 and 2.5 seconds real time running
python 2.4a0 (aka CVS) on the client and 2.2.3 on the server. Note that the
server is in production, so the different times were probably due to
transient server load.

Skip

Jul 18 '05 #2
Skip Montanaro <sk**@pobox.com> wrote in message news:<ma**************************************@pyt hon.org>...
Walt> Curious about why the same very simple xml-rpc demo code should
Walt> execute quickly under python2.1 but very slowly under python2.3

Walt> python2.1 ~4 seconds
Walt> python2.3 ~24 seconds on the same machine

Walt> Is there a well known reason for the difference?

Nope. I tweaked your script to contact my XML-RPC server over the net
(about 20-30ms ping times between client and server) and just make
server.echo() calls. It took between 1.6 and 2.5 seconds real time running
python 2.4a0 (aka CVS) on the client and 2.2.3 on the server. Note that the
server is in production, so the different times were probably due to
transient server load.


Any difference in speed between different versions of Python can sometimes
be accounted for by there not being sgmlop or expat modules installed with
the slower version of Python. But then, if the data set going back and forth
is small, this shouldn't really be the case.

Still worthwhile to keep in mind later on if the amount of data does increase.
Jul 18 '05 #3

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

Similar topics

0
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);...
0
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...
5
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use...
5
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...
0
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 ...
0
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): ...
9
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...
10
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...
0
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.