Speed of New Facebook Graph API with PHP SDK Slowing Developer Adoption
Back at f8, Facebook announced the new Graph APIs, a new set of APIs designed to provide simpler ways for Facebook Platform developers to interact with Facebook data compared to the old REST APIs.
While many developers have started testing code using the Graph API, some are reporting significant slowness with the new APIs when used with Facebook’s latest PHP SDK.
In particular, one of the largest developers on the Platform showed us unit tests that produce the following results:
- Old API, basic FQL query: ~0.1 second response time
- Graph API: ~2 second response time
- Graph API, same FQL query: ~7 second response time
We’re sure Facebook is working to improve response times – a Facebook spokesperson says they will have updates on this soon. But as a result, this developer is unable to start moving onto the new Graph API in testing environments, much less in production, for now.
It should be noted that this test was specifically run via Facebook’s PHP SDK. We’ll let you know as we hear from more developers moving code onto the new APIs.
Update: “We’ve seen some issues with less frequently used features, however we are continuously working on improving performance for all of our API methods,” a Facebook spokesperson says.













June 17th, 2010 at 6:50 am
The Zend Framework PHP5 Facebook Service component is in the works, i tested i yesterday and i can say it speed is decent, i have no benchmarks yet.
June 18th, 2010 at 11:34 am
Hi,
I work at Facebook. We found the key issue slowing the new SDK down, which seems to be related to curl handling the serialization. When we do the serialization ourselves, the issue does not manifest itself. It’s fixed in v2.0.5 of the SDK. Here’s the change: http://github.com/facebook/php-sdk/commit/b5705438681517cedfcea87fca5d0f9f2504e0c7
-Naitik
June 22nd, 2010 at 7:14 am
I am trying to switch my applications to the new Graph AI – however there are a bunch of things that don’t work properly – the most important of which (for me) is the Publish Stream allowing me to post a flash SWF on a person’s wall. I have gotten permission from the user for Publish Stream – but posting a SWF does not work at all. There is a reported bug here:
http://bugs.developers.facebook.com/show_bug.cgi?id=10672
June 30th, 2010 at 5:49 am
Dear Naitik,
You are correct about the serialization, but as the poster revealed, there’s a huge problem running FQL queries using the new PHP SDK, my application suffers 7-10 seconds delay in loading time due to a single FQL Query, and it seems that we’re unable to run Preload FQL anymore with the new SDK.
Hope this gets resolved very soon.
July 15th, 2010 at 2:56 pm
Hi,
Wanted to know if the performance problem of the new PHP-SDK with FQL still persists ?
Also, I read somewhere that someone from facebook said that Preload FQL is being deprecated. Is that correct ? Also, when can we expect PHP-SDK support in Preload FQL if it’s not going to be deprecated?
Thanks,
Bar.