On 25 January 2011 12:22, James Westby <[email protected]> wrote:
> On Tue, 25 Jan 2011 12:10:43 +1100, Martin Pool <[email protected]> wrote:
>> I had a bit of a go at this over the weekend.  It is gratifyingly fast
>> compared to what I expect to see with launchpadlib clients, just
>> through doing fewer requests and not unnecessarily blocking on them.
>> I like that a lot.
>>
>> The code is in <http://launchpad.net/wrested> and lp:wrested.
>>
>> For instance:
>>
>>  ./wrestler.py https://api.launchpad.net/devel/bugs/1
>
> To be fair I believe lplib would perform approximately as well if you
> just did lp.load('https://api.launchpad.net/devel/bugs/1').

Right, I don't have any magic to make the packets faster, so if LP
does just one request it will be just as fast.  I think the
differences are:

 * for high-latency services, using some kind of async thing is very
good, and lplib (afaik) doesn't support either twisted or multiple
threads(?)
 * the natural way to use lplib has you do several transactions on the
way to asking for that url
 * if you don't have a known-fresh cache of the wadl, it will spend a
long time fetching that

So the first is a reason to do a client in Twisted; the other two are
reasons to reconsider what API we present to the application.

-- 
Martin

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to