Facebook API so slow
I'm using the PHP SDK and it's really slow, for example to run this:
try {
$me = $this->facebook->api('/me');
if ($me) {
开发者_如何学Python return true;
}
} catch (FacebookApiException $e) {
return false;
}
I bench marked it at 0.8605. This adds up to a lot, is there a better way to query this data?
You can cache the response and then subscribe to real-time updates to get notified if that data ever changes. You could also load it asynchronously through javascript in the browser. I haven't seen that slow of a response time from /me though so it could be a temporary issue. Are you sure its not network response time? What country are you requesting it from?
精彩评论