Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Alan Larkin
Unnecessary Retrieval of All Data [ reply ]  
2008-12-18 10:48
I'm having a problem in development because fetching user info from facebook is taking 20 seconds on my development box, which is in excess of the Facebook timeout, so all I ever get is an error that my app isn't responding.

I looked into the source (mmangino's github) to see what was happening when I said facebook_session.user.name (for instance).

As best I can tell, this will cause an execution of model.rb:35:

populate unless populated?

That call to populate is dispatched to user.rb:115. In here an API call is made to retrieve the specified fields. However as no field names are passed from model.rb:35 it defaults to retrieving all info.

This seems wasteful to me. Does anyone know if any of the 50 odd forks have modified this to retrieve only the data demanded?

If not, does anyone agree that this would be a useful modification?