gallery time-out

I have a gallery with over 1700 photos organized in 50 albums. The gallery and albums have each 25 thumbs per page. Whenever I go to the top level, i.e. the gallery, it takes a really long time to show the 25 thumbs, in fact most of the time it times out (on my PC) and takes along, long time on a Unix host to show. I have to do repeated browser refreshes after the time outs until gradually the thumb for each album shows up in my gallery. Note that this happens even when all the thumbnails are already generated there are no new photos added and I just revisit or navigate to the home page and caching is always enabled.

My question is, why is there such a long delay is showing 25 thumbs of cached images on the home page? Is there anything I can do to speed up the home page navigation?

Clean URLs are enabled. This problem became apparent around 800-1000 images in the gallery and is present in both versions 1.2 and 1.2.1 using any theme. Cleaning up the database and/or doing a re-install does not help. I do not use any tags.

The timeout errors appear most frequently on

...\zp-core\functions-db.php on line 73

occasionally on:

\zp-core\class-image.php on line 47

\zp-core\classes.php on line 267

\zp-core\functions.php on line 2704

\zp-core\functions.php on line 1576

\zp-core\class-image.php on line 47

Comments

  • The images are actually small - resized to 600 by 400. But I just figured out the problem: the default zenphoto installation has the album thumbs set to be selected randomly. I guess every time the user navigates to the home gallery page a random thumb is selected for each of the 50 subalbums. This probably means the entire file structure is read to find the random thumb - so a lot of I/O, hence the time-out. After I reset the album thumb to be a specific image, the performance dramatically increased, and it is now as expected, very fast.

    So for the next release I'd recommend to set the default thumb selection not to random, but perhaps to the first image in the album. This will allow the gallery to have good performance from the start, without having to modify each album to remove the random thumb and select a fixed one.
Sign In or Register to comment.