The random photos are back. I wrote a quick hack to loop over every photo in every album and read its relevant info into a MySQL table. Now instead of taking a few seconds to get a random photo using the Gallery data stores, it uses a single query and takes a millisecond. Long-time visitors to the site remember that the random image in the corner has always been one of my favorite things about this site, but as the photolog grew to a thousand, two thousand, and then nine thousand images it slowed down more and more. I had to start caching it so it would change once every 15 seconds, then every minute, then every 5 minutes, and then I just manually rotated it for a while. Finally I put the random image out of its misery.
Now it’s fully dynamic, every page you view is completely unique, just like you.
(There goes my bandwidth.)
hehehehe F5 F5 F5…..
Indeed! Nine thousand photos is a whole lot, I can imagine those take up a lot of server space. (Poor me, I’ve only got 75 MB on my server, with a bandwidth limit of 5 GB…)
@Dale:Hehe, nice one!
@Matt: Another big PRO for RSS et. al., don’t you think?
Awesome Matt! Bandwidth, Smandwidth!
Nine thousand photos? Wow. Maybe you should have your randomizer provide a unique photo when a visitor comes back, without serving a photo twice. Until all 9000 photos are delivered for that visitor. Then another shuffle, and the same cycle all over again…
Just another stupid idea. 😉
Hey Matt, ever heard of “limited bandwidth”!!
Hurrah! I love the random image, and I missed it since it went out of rotation (well duh). Thanks for putting it up again.
Remember, you’re unique, just like everyone else.
Thought bandwidth was a commodity which one doesn’t have to worry about anymore? 😉
Anyhoo… good to see it back as I’m using Gallery’s native “Random Block” feature on a friend’s site since June-ish, and finally gave in and started using it on my own blog just a couple weeks ago.
F5
F5
F5
F5
F5
😀/me feels dirty in misusing <code> when he should have used <kbd>…
I must say, 9,000 images is alot. It’s very good to see the random images up again. I did miss that space up there in the corner. Yay for photos!
And the code? Is it free? LOL. ThX
Wow, so there -is- a reason you’re URL is photomatt.net
Always wondered why the ‘photo’ bit
Reload to your heart’s content, that is what it’s there for. I use a lot of bandwidth, but it’s still a fraction of what’s available. Besides, what is the point of bandwidth if you don’t enjoy it?
Wow. That’s a bit kah-razy… I want that kinda bandwidth to throw around!! 😉
Very cool.
yay! It’s back! 😀
Thanks Matt! I enjoyed this feature as well.
Looks very good Matt. And being on dial-up there nice and small and don’t add much to load time. Nice.
rockin’.
Very cool. Glad to see it back!
Are you dynamically thumbnailing the photos before they are displayed?
Nope the thumbnails are generated when I upload the picture.
Ah, the random photo. Beautiful. 🙂
Yeah!!! I’ve missed the random photos. It’s really strange to load up your site and see myself there though!
Does it ignore Gallery-hidden images and albums, per chance?
Yes it does.
Groovy. Tunes. Thanks, Matt! I use Gallery to organize as well as to present, and I don’t think anyone wants to be bombarded with random clip art or blobs. 😀