Can you farm out image rebuilds across multiple browsers?

Nosaj

Joined: 2004-10-01
Posts: 62
Posted: Fri, 2013-09-27 16:15

(I am slogging through trying to tweak our newly upgraded Gallery 3 site to function more like our previous Gallery 2 site. Sometimes this is not possible, but where users have complained quite a bit, I am trying to adapt it. I have a short (thankfully) list of these, so I will keep them in separate posts to not get things more confused.)

In trying to adapt/customize G3, I am quite often running into the need to change a thumbnail size or other such command that results in me seeing the dreaded "One or more of your photos are out of date. Please rebuild images now" message. With our server (pretty swift server btw) it takes about 6 days to rebuild all our 60K images. I had the rebuild process explained to me (thanks Dave!) and how it doesn't really matter about the server specs but rather the client browser calls, and was wondering about a possible way to speed things up...

If I remember correctly, the rebuild process has to make calls from the server back to a browser (vice versa). Is it possible for an admin user to specify they only want to rebuild the images within a specific folder? Then have another admin user on a different computer specify they want to rebuild images within a different folder? And so on until you have about 4-5 rebuild processes running?

My hope would be to have one computer/browser rebuild the 2006 album, one rebuild 2007, one rebuild 2008, and so on. That way the rebuild process could be farmed out over several different "browsers" in order to hopefully speed up the 6 day rebuild down to a more manageable 2 day or so rebuild.

Any idea if that is a possible way to speed things up? Or would that just be asking for problems?

EDIT -- on a related note... If we do have to fall back to having a 6 day image rebuild, while the image rebuild sits there running, will normal users see anything odd going on other than some images may be rebuilt and some not?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Sat, 2013-09-28 16:16

Well, my first question would be why do you keep changing the thumbnail size over and over again?

2nd question would be how large are your originals? Rebuilding 60K images (for me) takes nowhere near 6 days. Maybe reducing the image size before uploading would help? If for some reason you need those gigantic images to be uploaded as originals and you foresee the need to keep rebuilding your entire Gallery over and over, it may be worth your time to edit the rebuild module to rebuild thumbs off of the resizes instead of off of the originals--but there may be a lot of scenarios you'd have to code around.

Nosaj wrote:
Is it possible for an admin user to specify they only want to rebuild the images within a specific folder?

Unless I'm misunderstanding, that's the way it works by default. Just go to the folder you want to rebuild and use the rebuild items option.

Nosaj wrote:
will normal users see anything odd going on other than some images may be rebuilt and some not?

That depends on why you keep doing this. If you're drastically changing the template and need a different size, then they may see awkwardness if the images are too small or something--but, generally, they wouldn't see any issues. (Easy enough for you to view as a guest to see what they see during the process.)

 
Nosaj

Joined: 2004-10-01
Posts: 62
Posted: Mon, 2013-09-30 13:49

Most of the images are in the 3 - 6MB range. We use 1024 as the "intermediate" size to our non-logged in users can grab an image acceptable for their Powerpoints and such. It seems to take about 15 - 20 seconds per image rebuild (based on watching the Rebuild Images screen).

We had used 150 as our Gallery 2 thumbnail size. With Gallery 3 it went to 200 and on the initial G2 to G3 import we kept it at 150 hoping it would bring things in quicker rather than having to recreate everything at 200. After everything was brought in at 150, users felt it was just a bit too small, so I was going to let it go back up to the default 200 size. So this is really our first full rebuild since we initially imported over from G2 (I am hoping it will be the last for some time!).

I had a small test album of about 50 images that I wanted to use as a tester to see how things would look, but could not find a way to just rebuild those images/thumbs in that one folder. That is ok this time though, since we really needed to go ahead and let the whole thing rebuild to get it back up to the default 200 size.

I went ahead and warned our photo group that for the next few days they will see some 150's and some 200's and it will make things look a little odd, but once it is all moved over to 200's it should make the pages flow better.

I let it run over the weekend and it got about 20K images before timing out. I started it back up this morning in hopes it will work through the other 37K. I just wish I could split up that rebuild task across several parallel computers/processes in order to make it go faster.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Mon, 2013-09-30 14:46

In web terms, 3-6MB is HUGE. You don't really need to upload images that large unless people are going to be downloading them for print. Otherwise, you should shrink them down and optimize them for web/screen-only use.

If you're using the rebuild_items module and go to an individual album, select "rebuild items" from the menu--then rebuild thumbs. That would just rebuild the individual album.