Facebook API Responses Very Slow (oAuth)

I am doing some benchmark testing on my web app and notice that the responses from Facebooks API are a lot slower than Twitters.

** For the record, I am using the twitter-async library for Twitter API integration and Facebooks own library here

With the Twitter library I can save an oAuth token & secret, I then use these to create an instance and make calls, simple. For Facebook, unless I ask for offline_permission, I must store an oAuth code and recreate an oAuth access token each time the user logs into my app.

Given the above I can:

Retrieve a Twitter users timeline in 0.02 seconds.

Get a FB oAuth Access Code in 1.16 seconds, then I can get the users details in 2.31 seconds, totalling 3.47 seconds to get the users details.

These statistics are from using functions Facebook has provided in their PHP API library. I also tried implementing my own CURL functions to get this information via a request and the results are not much better.

Is this the same kind of response times others are getting using the Facebook API?

Besides requesting offline permission and storing the permanent access token, how else can I speed up these requests, is the problem on my end or Facebooks?

Thanks,

Chris

8
задан user674952 24 March 2011 в 13:20
поделиться