On Sep 14, 2011, at 11:29 AM, Anthony wrote:

> On Wednesday, September 14, 2011 2:20:26 PM UTC-4, Jonathan Lundell wrote:
>> 
>> How can the JSON times have increased (slightly) with the removal of all the 
>> db.py code? This seems odd.
>> 
> 
> The JSON-vs-XML speed issue probably has to do with using the pure-Python 
> simplejson library from contrib. In class Service, we should try to import 
> the Python library json (2.6+), then simplejson (from the system, which might 
> have the C optimizations) and only then fall back on contrib.simplejson.
> 
> This would have to be done in gluon.serializers, too, and you want to make 
> sure that the jsonrpclib is using the right json library.
> 
> But why would XMLRPC be faster than JSONRPC only when Auth is disabled? If 
> enabling Auth adds 27ms to XMLRPC, why doesn't it add anything at all to 
> JSONRPC?
> 

I figure, chip away at the problems that have a rational explanation first, and 
then look at the truly weird one.

Headers could be a clue. Keep in mind that the auth isn't actually doing 
anything, except for creating the object. What that would be faster in some 
cases I don't know, but it's one reason I think it'd be useful to see the 
request headers. Assuming that the measurement is real, and that it's really 
Auth() overhead, there has to be a difference that Auth could get hold of.

Reply via email to