I’m loving the new gallery script I’m using called Singapore. It really looks stylish, and most importantly, it works great for posting lots of pictures quickly. I needed a script which is smart enough to work with pictures I dumped into directories. Singapore is great for this.
My two gripes with it: its slow speed and lack of database support. Speed isn’t really Singapore’s fault, since it relies on external apps to resize the thumbnails. And database support would be great for image captions.
I figured out where the slowdown is for thumbnails, too. I’m using ImageMagick to resize my images. ImageMagick produces high-quality thumbnails at the expense of speed. I could use GD, but thumbnails generated by GD are crappy.
Anyhow, ImageMagick’s convert utility spends its time shrinking a 1500×3000-ish pixel image down to 100×200-ish size. Those it uses for its gallery indices, which is fine.
The REAL slowdown is when you view an image at its largest size. While convert can spit out the larger resized image fairly quickly, there are five tiny (50×100) thumbnails at the top of this page. Each tiny thumbnail also spawns a convert process, bringing the server to a crawl.
I’ve decided the tiny thumbnails are redundant, since the galley index thumbnails (the 100×200 ones) should be more than adequate for this page. Since they’ve already been generated, the time it takes to view images should speed up by a factor of five. Now we’re talking!
I’ll patch the PHP code tomorrow and offer my patch to anyone who cares to ask. This should also give me a good excuse to dig into PHP.
Try clicking around Hallie’s gallery to see what I mean.