How does thumbnail generation work?
Permalink Browser Info Environment
I handle a LOT of images. Right now I'm having a big problem with C5 5.7, and there's a ticket on github about it. If too many thumbnails are trying to be generated at once, it causes runaway memory problems.
Does your gallery try to generate thumbnails all at once from a set, or will it only generate a few at a time and manage the impact to the server?
Does your gallery try to generate thumbnails all at once from a set, or will it only generate a few at a time and manage the impact to the server?
Type: | Pre-Sale |
---|---|
Status: | In Progress |
Here's my old 5.6 site that I've kept archived, and I linked to an image gallery that only generates displayed images instead of the whole set (amiant image gallery -http://www.concrete5.org/marketplace/addons/amiant-image-gallery/).... By limiting to 8 per page, it doesn't bring the server to its knees if there are some thumbnails that are not already generated.
http://www.conc56.newflyers.net/index.php/gallery/n566fd-gallery/...
On the other hand, on my 5.7 site, I had to edit all of my images and down sample them because even rescanning 2-3 was causing my VPS to run out of memory.
http://www.newflyers.net/gallery/n566fd...
I need to know if I can set up your gallery to only display a few images per page, and it ONLY generate thumbnails (if not already cached) for images on the current page. Right now, if I start adding more images to the N566FD set, I have to break it up into several pages and several sets, which is a pain in the butt.
http://www.conc56.newflyers.net/index.php/gallery/n566fd-gallery/...
On the other hand, on my 5.7 site, I had to edit all of my images and down sample them because even rescanning 2-3 was causing my VPS to run out of memory.
http://www.newflyers.net/gallery/n566fd...
I need to know if I can set up your gallery to only display a few images per page, and it ONLY generate thumbnails (if not already cached) for images on the current page. Right now, if I start adding more images to the N566FD set, I have to break it up into several pages and several sets, which is a pain in the butt.
Hi,
Galleria has an option to set number of images to preload in advanced:
Preload: Defines how many images Galleria should preload in advance. Please note that this only applies when you are using separate thumbnail files. Galleria always cache all preloaded images. 2: preloads the next 2 images in line, ‘all’: forces Galleria to start preloading all images. This may slow down client. 0: will not preload any images.
Galleria has an option to set number of images to preload in advanced:
Preload: Defines how many images Galleria should preload in advance. Please note that this only applies when you are using separate thumbnail files. Galleria always cache all preloaded images. 2: preloads the next 2 images in line, ‘all’: forces Galleria to start preloading all images. This may slow down client. 0: will not preload any images.
Hey sorry, been really busy.
I don't know if preloading will help or not. Here's the situation: Concrete 5.7 has really poor memory management right now when it comes to thumbnail generation in FastCGI processes (may also be applicable to others). It's caused by the calls to imagemagick to generate the thumbnails, and until thumbnail generation is complete, it doesn't clean up after itself. My github issue ticket was recommending that a queueable task be used instead for each image to mitigate the problem. Also, while imagemagick is being used, no other webserver requests can be served, and that's another issue that I am fighting with.
If cached thumbnails don't already exist, C5 will try to generate them. By using amiant image gallery on my old C5.6 installation, I could limit how many are displayed per page and lower website impact if the cached thumbnails didn't exist.
I don't know if preloading will help or not. Here's the situation: Concrete 5.7 has really poor memory management right now when it comes to thumbnail generation in FastCGI processes (may also be applicable to others). It's caused by the calls to imagemagick to generate the thumbnails, and until thumbnail generation is complete, it doesn't clean up after itself. My github issue ticket was recommending that a queueable task be used instead for each image to mitigate the problem. Also, while imagemagick is being used, no other webserver requests can be served, and that's another issue that I am fighting with.
If cached thumbnails don't already exist, C5 will try to generate them. By using amiant image gallery on my old C5.6 installation, I could limit how many are displayed per page and lower website impact if the cached thumbnails didn't exist.
I'm not sure, how many images do u want to select? What is currently happening is get all fileID s of a file set, then generate thumbnails one by one.