proper way to improve the performance of facebook.users.getInfo

Nov 30, 2008 at 1:35 AM
Hello,

in my facebook application I'm using the 2.0 release of the .NET SDK.  I need to get a small number of user fields from a large number of different users.  to be more exact I need the first name and the URL for their profile picture from ~1000 friends.  in my usage of the this.API.users.getInfo() I'm getting a large amount of network traffic for this call resulting in sluggish performance

I'm using the this.API.users.getInfo(List<long> userIds) method.  It's my belief that this method calls into facebook.users.getInfo asking for many many fields?

since I only need a couple fields,  I'm hoping to get some guidance on the best way to improve performance (both the # of bytes transferred and the latency of the request).  Naively I think simply passing fewer parameters in the implementation of the facebook.users.getInfo request could result in what I need?

my gut belief is that I've got the following options

1. change the implementation of users.getInfo() to get just what I want.  the con here is I end up forking and upgrading the SDK will be tough
2. add a new method to users that does what I want,  again breaking my ability to upgrade
3. create a new class that does what I want and place the class in the facebook namespace... doable but crusty,  I'm leaning this direction since it will make SDK upgrades easier in the future
4. cross my fingers that there is a slick ninja way to tweak the parameters being passed that I'm unaware of :)


any tips will be appreciated!

-CG



Dec 1, 2008 at 12:14 PM
well you could become a developer/contributor to the project and then you can ADD a new method to get what you need and then check that in.

But, have you considered using fql? just execute fql that gives you the info you need.