Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle too much data being returned by foursquare? #6

Open
amithgeorge opened this issue Aug 1, 2010 · 0 comments
Open

How to handle too much data being returned by foursquare? #6

amithgeorge opened this issue Aug 1, 2010 · 0 comments

Comments

@amithgeorge
Copy link

If a user has say 500 friends, calling the foursquare api to get his friends list will result in 500 user objects being loaded into memory... can there be a better way in which the objects could be streamed to the api caller? I dont know much ruby, but am thinking something like yield a object at every iteration from the stream or maybe store the stream to disk and yield objects from the disk based stream ... My use case is checking for users who are foursquare friends and auto-friending them on my service. If a few popular users decide to signup at pretty much the same time, my 512mb linode vps might run out of memory...

It would be great if the foursquare gem could handle that transparently for me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant