Drupal for Facebook Slowing Down Your Site?
A user recently reported Drupal for Facebook causing pages to load very slowly. Here's a quick fix.
The first rule of troubleshooting Drupal for Facebook is "enable the fb_devel.module". This module will alert you to all sorts of potential errors, perform sanity checks and write verbose data to Drupal's watchdog log. It is essential to enable fb_devel.module when you first develop a Facebook App.
The exception that proves the first rule is this: if the problem you are troubleshooting is performance, disable fb_devel.module (and while you're at it, disable devel.module). With those modules disabled, try to reproduce the performance issues. With any luck, fb_devel.module's sanity checks are causing the delay.
That's it. fb_devel.module is slow, because it is doing its job. Disable it on live websites, and when testing performance.
- Forums:

FB User Management are also
FB User Management are also slowing down my site on a shared hosting environment. Every refresh/reload will take my site to load twice.. weird and strange..
www.victoria.my <-- now with FB User Management disabled.
Refresh on each page
Hi, the same issue here with FB 6.x-3.4-rc1. When you log in using facebook, it will reload on each page you visit. The issue did not occur in 6.x-3.1
Hi - we're having some problems getting FB connect to work fast
belocal.com is the website
signed in as admin - it's fast
signed in as fb user - it's very slow
we've disabled fb dev
any thoughts ?
Even with fb_devel.module
Even with fb_devel.module disabled, there may be some pages slowed down because they query facebook.com. But those pages should be relatively few.
There's a known issue with 7.x-dev build... this patch http://drupal.org/node/1249026 needs review. Give it a try if using D7.
Otherwise post your issue on http://drupal.org/project/issues/fb.
This is what I was looking for ;)
This is what I was looking for
Still facing problem
Hi Dave Cohen,
I have disable fb_devel.module but still my site slowing down.
What I did Please suggest
Thanks
Masoom
Then you have to do some
Then you have to do some troubleshooting / debugging to find out exactly what is slowing you down.
For example is the drupal server slow or is it the javascript on the client end? There are tools out there to help you figure out things like that.
Tools to help site faster
Please, tell us which tools we could use to help the site faster and where to get it.
YSlow
For troubleshooting the frontend, the YSlow plugin for Firefox or Chrome are great tools- Dries did a writeup on it a good while back-http://buytaert.net/yslow
For server performance, it depends on your configuration- what OS, what web server, etc you are using. If you use Linux, do some Googleing for Linux performance analysis tools or similar.
Drupal 7 - Connected - slow performance
Hi all!
I confirm this performance issue. I have made several test and narrowed down the performance issue.
I have facebook accounts like 12345@facebook (machine friendly) and when drupal fires function fb_format_username($user) the response takes ages.
If I only print $user->name there's no performance issue.
I haven't yet debugged code what may cause this issue. Also when logging in via Connect the response takes from 15 to 30 seconds. I believe this is somewhat same issue.
Otherwise - GREAT MODULE COLLECTION!! Thank You!!
Managed to get the performace
Managed to get the performace right using session variables and global variables just to show logged in username... other variables of course available too...
I'm storing FB variables to session variables.
Security and functionality observations are not made at this point.
Please comment and get me to right direction if there are something to consider...
// check that user has logged in
if ($fbu = fb_facebook_user()) {
// get app id from globals - is there better way??
$fbid = $GLOBALS['_fb_app']->id;
// stored variables available in session
//// dump variables
// dpm($_SESSION['fb'][$fbid]['userinfo'][$fbu]);
print($_SESSION['fb'][$fbid]['userinfo'][$fbu]['name']);
}