delete not empty albums and better pre-cache

Hi!

Ive used zp for a couple days now and ive noticed some stuff that could be better:

Deleting an album that still has images in it or a hidden folder.
Maybe it just was my doing, but i got a couple PHP errors when zp stumbled upon some .hidden folders and some with images in it still. So, recursively travel the dirs hierarchy and on the way up, delete folders :)

Better pre-cache.
Ive got some 5000 pics, pre-cacheing them all at once might be a bad idea, but if you do it albumwise (maybe if amount of pics in album is >=10) it shouldnt be to hard (and stay under my php's 30second script timelimit(?)), and then press "Pre-cache next album/page". Itd require some attention, but so be it.
On another thought, why not checkmark select the albums you want pre-cached?
Also, pre-cache seems slow, but i know filesize and maybe even GD has a say about it, cant wait for a choice of imagemagick too :)

I rather enjoy zp, it seems to have a light footprint yet robustly scripted and easy to work with. And i can upload albums via FTP <3.

BR,
David

Edit: Fixed some spelling.

Comments

  • acrylian Administrator, Developer
    1. Try not to upload hidden files...:-) Or delete directly via ftp.

    2. Regarding pre caching please read here (especially the posts by trisweb):
    http://www.zenphoto.org/support/topic.php?id=3418&replies=14#post-20607
  • Re 1: Yeah, ive tried out a lot of galleries on the internet and one made some _thumbs and .thumbs folders with the user/group www-data, so it got hard to delete it (had to google a phpscript) with ftp/bash.

    Re 2: I dont really want a 3rd party program, i just want to upload and forget :)
    I can think of some options set so that zp checks the total size of the album and if its humongous in ratio to the amount of files, then do a "watched" pre-cache having to press next, or, if its possible, have the last pre-cached thumbnail trigger a function to load the next batch of images.
    This is ofc only to alleviate the php script timelimit as the server will still be under a lot of load during pre-cache.
    Re 2.2: Another idea is to resize the images first (to a resolution of choice) and then after resize, precache thumbs/smaller-than-original-images-images :)

    Anyway, my suggestions for contemplation! Ive got alot of ideas but lack the know-how :)
  • What PHP errors did you get deleting albums? ZP attempts to delete all files in the album. Of course, if it does not have permissions to delete them....
  • It most likely was permissions, i didnt check closer and the only stuff i tested just now was problems with permissions. `ls -lR` showed, except for a few files, my username as owner and www-data as group. Which, iirc, shouldnt cause a problem... As i said, it was probably my fault.
  • acrylian Administrator, Developer
    minitoe: The clue about the precaching is that you actually don't need to precache the complete albums. It is done on the fly while someone visits an image on your gallery the first time. For that one person only it will be a little slower but from that on it is cached forever unless you change the image size.
  • acrylian: And to resize the images prior to upload. But, as i said in a previous post, id like to upload and forget. I guess i could find a script to resize, but im also using my site to store the originals, which would create duplicates and thats just a waste of space :)

    Anywho, it was a request, im obviously voted down :)
  • trisweb Administrator
    minitoe - have you tried just uploading and forgetting? There's no need to resize as long as it's going fast enough for you and you're not seeing any problems. We recommend that for a web gallery you keep them small, as everything will be faster that way, but it's not necessary as long as your server has the horsepower to process large images.
  • trisweb: it takes ~27sec to cache and load 18 images from browsing the gallery (1 page of an album). Each of these images are ~3Mb. So yeah, upload&forget works when just browsing the gallery.
    What i requested was a better Pre-cache button in the admin part, as it loads every(?) image in the whole gallery, thus exceeding 30sec of PHP script time, causing PHP to force a stop of the script.
    The server is a 2x P3 800Mhz with 768Mb RAM. Its not new, but works well as a webserver, and currently is all i can get a hold of.
  • Well, you do have the option of using the precache on an album basis. Or, as many have recommended, just let things happen naturally.
  • wait what? there is something like that?.. uuuhm, well.. lets redefine then: when going through setup, could it be possible to test the server ability to pre-cache, and thus warn against or right out disable pre-caching everything? As pre-cache was just about the first thing i pressed, and i think theres many more that do the same.
  • I gather that you pressed the button before reading the pop-up hint.

    I doubt that is worth doing. As Tris has said multiple times, "Let's not be preocupied with pre-caching." It is not normally necessary. Some people like to force all the images to be in the cache. If you are one of those people, you will see the server cost when you do it. If the cost of doing the whole gallery is too great, do just one album (subalbum) at a time. If even this level of pre-caching is too much for your server, change your mindset about needing to do pre-caching.
  • Just read at www.pathtoolong.com
  • Sorry. You will really have to work with us if we are to find this problem. So far you are the only one reporting such an issue, so most likely it is something on your site or that you have done with Zenphoto. We are not likely to be able to guess what.
  • acrylian Administrator, Developer
    And here is a detailed text why it is actually not necessary to precache:
    http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#22
Sign In or Register to comment.