Hello,
dear author of my favorite photoalbum,
Today, I have discovered not really a bug, but rather a feature request:
please consider, if the code for counting all gallery subitems (line 259 to 276 of the print_album_menu.php) should be interrupted if it takes too long to evaluate. Or if it can be cached somehow.
Under my installation (latest version 1.4.14), there are 12000 photos in 100 albums and it took [b]14 seconds[/b] to enumerate the menu function. With html_static_cache disabled the server was unusable. Static html caching helped, but when cache expires, it takes too long to generate it again.
So I finally decided to disable the $showcount in theme completly, so number of subitems are no longer showing.
I suggest:
make a new option in admin panel to toggle the counting feature easily on or off. It can be placed in theme settings or cache settings or menu settings too
and/or set the loop iteration limiter (i.e. "500+ photos in this folder...") or set the maximal execution time of the loop
or (at least) do not enter the loop if static caching is disabled:
(L259) if ($showcount && extensionEnabled("static_html_cache")) {
We will probably not create another option for disabling the count (we really try to avoid "option overload"…) but you can do that yourself via the menu function's parameter as you already noticed gladly.
printAlbumMenu() function has a parameter, $showcount which is the option you seek. You noted this parameter in your #3 suggestion. You can easily make a modified version of your theme that suppresses these counts.printAlbumMenu() function will not be called. If the page cannot be cashed because of the error, revert to #1.