This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2011-09-06 16:58:25

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Who friended me?

Actually, it would be much much faster on the Scratch's servers because they aren't loading each page. All they need to do is 'mysql_query("SELECT [username] FROM table")' and they'll get the response in five seconds ( probably less ).

What you are doing, is loading each page one by one, so it makes the request to the server, it gives you the page of friends, then it requests the next page. Since it takes maybe a second to ten seconds to load each page, depending on your internet speed, then the time it takes to parse it would take, a long time. Since it takes time to make the request and get an answer. But if it's all done on the servers, then it takes only a couple of mysql requests and it's done.

Your method is making at least three mysql requests in a per page load for 800,000 users. So if it took one page a second, 800,000 seconds to do that. But there are other things going on so it could, and probably will, take longer.

Offline

 

#27 2011-09-06 17:02:15

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Who friended me?

I suppose that's true.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#28 2011-09-06 18:47:25

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Who friended me?

This looks very cool but it's probably for the best that it doesn't work very well. I don't think the poor Scratch servers could handle that many requests!  big_smile


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#29 2011-09-07 07:06:44

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Who friended me?

fullmoon wrote:

This looks very cool but it's probably for the best that it doesn't work very well. I don't think the poor Scratch servers could handle that many requests!  big_smile

As Magnie pointed out, if you lot did it it would only take a few seconds since you'd simply need to use a MySQL request to pull it! Perhaps something to add to the api?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer