Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorpalik
    • CommentTimeJul 26th 2006
     
    hello

    Well i bought rather cheap hosting plan and thought that <300kB gallery script will be just perfect, but it is not true.

    First - importing more than 50-80 pictures gives me error 500. I think you could do an step by step approach to this feature. Even on great server with high memory limit importing 1000 pictures will be a pain in the ... :)

    second - slideshows and big galleries. In gallery.php code i see that you have function that prepares javascript code lines for every picture and add it to variable, then return it - i think it is a waste of memory ...

    on my server slideshow gives error 500 for 150 pictures and, of course, bigger galleries. Maybe it could be done in some other way (my first thougt is to make an array of filenames (not whole lines) and then pass it somehow to js script... )

    thats all for now from me, if i manage to overcome this problems i definetly share it here :) now i only want to ask if you (devs and users) think the same?

    oh, and on dev. site i cannot post any bug (page loads infinitely )

    regards!
    • CommentAuthorddejong
    • CommentTimeJul 26th 2006
     
    The best idea would be to upload in batches/directories. From what we've learnt, it is seriously unadvisable to have more than 150 images in any one folder, as it seriously hurts filesystem performance. I don't envision a way of allowing the PHP script to run beyond max_execution_time, though I would suggest trying to set it inside the interating loop that generates the thumbs because every time this value is set, the timer is reset. So it would (for example) give each image 30 seconds to load, provided your host isn't killing off instances forcefully or preventing you from using ini_set().

    In regards to the slideshow, it is taken from a library and implemented in a rather stock fashion. I'm of the opinion that an AJAX-style slideshow that queries the server for a certain number of successive images (e.g. 10), the PHP would generate 10 thumbs, the XML, send, close, might do better for Plogger than the current implementation. Part of the problem is that Plogger is trying to generate all 150 thumbnails while generating the javascript. So, in short, it's not the javascript causing the problem ... it's the execution time to generate so many thumbs, or at the very least open, check and return them all. Only requiring a few at a time would likely ameliorate the problem.

    Those are my suggestions, though the others may have more.

    Cheers,
    Derek
    •  
      CommentAuthorpalik
    • CommentTimeJul 28th 2006
     
    well, for slideshows, maybe we need no AJAX, but just reloading the page after certain amount of pictures - so clicking slideshow would generate page with 1-50, and after 50 photos reload page (with some variable as startFrom=51) and show pictures 51-100 and so on, it would be easier to implement i think...

    for big imports - i think it could be just the same answer - that was what i mean by steb by step approach - php reads directory and sees 250 filenames and then imports 1-50, then refreshes, goes 51-100 and so on...

    as of killing instances and ini_set() i think that is just the case on cheap hosts - they HAVE to kill too cpu-hungry apps by default or they servers would have to be powermonsters, and cost fortune - so they could not be CHEAP hosts anymore :)

    regards

    palik
    •  
      CommentAuthorpalik
    • CommentTimeAug 8th 2006
     
    temporary i hacked slideshow function not to generate thumbnails but just gather pure url's of images and throw them to js... slideshow works now with big galleries, but drwaback is obvious - if you've got big images, they will came out of screen... so it is temporary answer for now.

    Now my gallery.php about line 1180 looks like:

    $output .= 's = new slide();
    s.src = "'.$config["baseurl"] .'images/'. $row["path"].'";
    s.link = "'.$config["baseurl"] .'images/'. $row["path"].'";
    s.text = "'.$row['caption'].'";
    s.image_name = "'.basename($row['path']).'";
    slides.add_slide(s);';

    It works fine if your original images are not wider than screen :). If you have problem with wrong link from slideshow to original image - it also resolves this issue (you can only change s.link = line)

    I think i will continue with refresh option, rather than ajax... or maybe next plogger will have this issue resolved?