HomePortfolioTwitter

Image

Posted on by David Turner

Image

Just a little bit more on my Facebook. I’ve finally gotten the functionality perfect. Unfortunately the actual loading time of the app is exponentially poor, taking longer to load the more friends a user has.

Why? It’s quite simple. For each friend listed there are a series of queries run. These queries equal to the number of friends you have, to check and see which of them are common friends. As a result of this a user with 10 friends will run 100 queries (10 friends, 10 queries each) and a friend with 20 friends will run 400 queries (20 friends, 20 queries each).

As you can imagine this gets pretty insane when you get pretty high up there with friends. A user with 500 friends run 250,000 queries (500 friends, 500 queries each), which is just insane. If anyone has a suggestion on how to make this not so insane I’d love to hear it, as Facebook seems to lack a functionality to identify common friends in bulk.

Something to Say?

I love hearing from people that have something to say on a topic, but I have come to the conclusion that comments on my site aren't the best way to do this. If you have something you'd like to contribute to the conversation why not write a short article on your own site, or tweet about it? If you put something online, or want to comment on things, feel free to fire a tweet my way.