Jim Fulton wrote:
Michel Pelletier wrote:
I thought XML-RPC was now favoured over ZClient?
It's not really favored, both are quite useful. xml-rpc is more for when you want two different system to interoperate. ZClient is very zope specific and probably gives you a bit more functionality than xml-rpc (because it has the 'remote object' abstraction).
I don't think ZClient is really Zope specific. At least it's not supposed to be. It does have a richer API, including features like authentication and header support.
My bad, you're right.
Also, ZClient is much faster i've found, probably due to the marshalling/unmarshalling necessary for xml-rpc.
That's interesting......Hm. ZClient has to marshal. I suspect that xml-rpc wants some sort of optimization.
I made a test script to make about 300 xmlrpc calls to various manage_ methods. I had to kill it after about a half-hour cuz it was takin so long. Here's the profiler output: ncalls tottime percall cumtime percall filename:lineno(function) 702883/2151 108.980 0.000 288.580 0.134 DT_InSV.py:379(__getitem__) 7704 79.050 0.010 243.900 0.032 xmllib.py:201(goahead) 3852 42.300 0.011 43.160 0.011 FileStorage.py:706(_finish) 158831/158827 38.010 0.000 70.140 0.000 DT_Var.py:258(render) 732178 37.580 0.000 49.450 0.000 re.py:112(match) 495239/51912 36.690 0.000 307.200 0.006 HTTPRequest.py:741(__getitem__) 586827 29.040 0.000 29.040 0.000 re.py:335(group) 499291 22.900 0.000 30.530 0.000 re.py:95(search) 875347 19.500 0.000 19.500 0.000 re.py:290(__init__) 45981 14.090 0.000 39.000 0.001 xmllib.py:539(parse_starttag) 748592 10.680 0.000 10.680 0.000 exceptions.py:65(__init__) 541924 9.420 0.000 9.420 0.000 re.py:297(start) 456273 9.190 0.000 9.190 0.000 re.py:306(end) 107831 8.520 0.000 8.520 0.000 urllib.py:898(quote) 127647/10757 7.400 0.000 300.080 0.028 :0(?) 49113 7.160 0.000 8.240 0.000 User.py:140(getRolesInContext) 127647/4302 6.350 0.000 303.910 0.071 DT_Util.py:325(eval) 45981 5.360 0.000 19.870 0.000 xmllib.py:615(parse_endtag) 111258 5.240 0.000 7.030 0.000 xmllib.py:699(handle_charref) 3856 5.100 0.001 17.020 0.004 BaseRequest.py:224(traverse) 284515 4.510 0.000 4.510 0.000 xmlrpclib.py:387(data) I think you're right about optimizing, why is it spending most of it's time in DT_InSV? -Michel