[wp-hackers] Help with the API on WordPress.org?

Mike Schinkel mikeschinkel at gmail.com
Fri Jan 2 10:51:56 GMT 2009

DD32 <wordpress at dd32.id.au> wrote:
> Changing the API wouldnt help your page load times in the
> least. If the connection between your server and the
> api.wordpress.org server is low bandwidth or has high
> latency for whatever reason, its going to impact you,
> The same as if the .org servers are high-load.

Not exactly. Let me give you a use-case: say I'm research Twitter plugins
and there are 10 of them. Assuming the search results are good, I might go
back through the search 10 times to install each one. With HTTP caching
using a TTL of 1 hour, if I installed them all in 1 hour my server would
never have to call api.wordpress.org more than once. Currently in that
use-case it calls it 10 times.

And that use-case was not contrived. That is exactly what I was doing that
caused me to get frustrated with both the search order and the time it took
for the pages to load.

BTW, one thing unrelated to REST or cachine that could greatly improve that
use-case (which I haven't looked into yet) would be to make it so that once
the plugin is activated it returns back to the plugin search page the user
was last viewing. This would be very helpful when trying to install several
similar plugins for evaluation.

Or even better, let me put the plugins into a "basket" and then install and
activate them all at once!

> I just checked with a plugin i'm writing, and according to this,
> the .org api's return between 120~300ms, which seems perfectly
> reasonable to me, mind you, If your server is based on the other
> side of the  world, then thats not going to help you.. API results
> return within ~600ms(worst case) for me in Australia.

When a browser calls an HTTP page which then calls another HTTP page, those
delays can add-up to a slow user experience especially if thhe user is on a
slow link or the server is hosted on a congested shared server. (Speaking of
which, my guess is you have some pretty good bandwidth?)

We can split hairs over the time it takes for any specific use-case but
fundamentally I'm leaning on people like Roy Fielding and Mark Nottingham
who are architects of the web and who have explained the benefits of HTTP
caching many times.

Matter of fact, I should just give you the link to Mark Nottingham's
"Caching Tutorial for Web Authors and Webmasters."  I'd be interested to
know if you will still think the same about the relative benefits of caching
after you read it, assuming you have the time to do so:


> If the need ever arrises, I'm sure Automattic would lash out and
> throw some extra servers in a few geographical different locations
> to help load times :)

Why architect software that requires more hardware when it could just as
easily be architected where it doesn't require more?  Hardware and bandwidth
costs money where money seems to be in short supply these days; at least
here in the Bush's America it is. ;-)

> (I'm not saying its needed yet though, but the
> Automattic Network guys would know what they're doing.. )

There's a lot of smart people on the web. And because 'the web' is such a
broad topic, nobody has it all figured out. Not even Google or Yahoo, though
they come close. :-)

> The plugin? http://dd32.id.au/files/core-control.zip ,
> Activate the "HTTP Access Logger" module to find out
> how long the requests are actually taking -- It'll be
> up on wordpress.org/extend/plugins/ sometime later
> tonight :)

-Mike Schinkel

More information about the wp-hackers mailing list