?

Log in

No account? Create an account
Stopping at 25,000 - Queue — LiveJournal
January 12th, 2003
12:41 pm

[Link]

Previous Entry Share Next Entry
Stopping at 25,000
I think 25,000 user names is enough for my userpic script to pick random pictures from. I think I'll stop running the program to get user names now.

Even if I don't end up wanting to submit it anywhere (since LJ might not be happy about someone publishing something that shows how to hit their database a lot), I think I still want to write up the userpic thing. It's somewhat interesting, since I had to change how I was doing it due to them changing how they stored userpics.

(3 comments | Leave a comment)

Comments
 
[User Picture]
From:slinkr
Date:January 12th, 2003 10:24 am (UTC)
(Link)
LJ has a feature that takes you to the journal of a random user. Have you looked at using that to get a random username? It might be less database-intensive.
[User Picture]
From:queue
Date:January 12th, 2003 10:34 am (UTC)
(Link)
The thing about that is that it's slow. And, in any case, I still have to actually get the pictures, and those are the database hits I was talking about. If a bunch of people are loading a bunch of pictures constantly, then that hits the databases a lot. Of course, since I can't do it the quick way any more, things are a lot slower, so people are limited by that.

The traversing people's friend pages things is only being used to build _my_ database. From now on, that won't be use any more. The script just plucks a random name from that file on my server, then plucks a random picture from that person's allpics.bml page on LiveJournal.

So, thinking about it more, that additional slow-down is probably enough to have it not cause problems, even if a bunch of people were to start using it.
[User Picture]
From:slinkr
Date:January 12th, 2003 11:18 am (UTC)
(Link)
Oops. I misunderstood where the database hits were coming from.

Hitting the database a lot is sort of a relative thing though. To load 5 pictures using your script probably hits the database less than if I load my friends page with 20 posts on it, or if I view a comments page that has comments from 10 users with their userpics.
My Website Powered by LiveJournal.com