High CPU in apache and mysql during image chooser tree build

evilzenscientist

Joined: 2006-11-22
Posts: 29
Posted: Sun, 2008-03-09 03:47

Hey guys

I've got a pretty large online photo album - over 50k pics so far - and I expect that building the tree hurts the database - but it's getting pretty slow.

I'm going to move everything across to a new box in the coming week or two anyway - but any additional tweaking you recommend on the database, apache or php side to make this faster? Right now it's taking about a minute to build the tree view and thumbs for a particular album of around 20 pics.

I don't write code!| www.evilzenscientist.com | www.gonetoutah.com |

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Wed, 2008-04-23 12:39

Sorry for the delay in replying. Life got in the way of G2Image work for a while. I'm back to some development, trying to get G2Image upgraded to work with TinyMCE 3.0 first, and then to wrap up G2Image 3.1 and get it out the door.

I think I have improved the album tree build in the development code for version 3.1. In 3.0.2, the build is very inefficient, calling the Gallery2 database over and over. It also rebuilds the album tree for every G2Image page draw. For 3.1, the code is much more efficient, reducing the G2 database calls to a minimum, so the tree builds much more quickly, and the tree is saved in the session cookie, so it only gets built once per browser session or upon a manual refresh (so you can add folders to your Gallery and refresh the tree to show them.)

FYI, I'm going to try to get 3.0.3 out the door next week. The only changes from 3.0.2 will be an updated interface with TinyMCE and JCE for TinyMCE 3.0 and replacing Lightbox with Slimbox. (Same functionality, just smaller download and fewer conflicts with other Lightbox installations.) I have about two weeks of coding to do on 3.1 after that. The real trick is that it's going to take me a month or two to get that two weeks in because life is still hectic. I'm shooting to have 3.1 out in beta by June, with final release in July or August. SVN info and snapshot for the 3.1 development code is on this page in the G2Image Documentation. It's fairly stable and would probably help on larger Gallery installations right now.

If anyone would like to sign up for the G2Image release announcements, you can do so at http://g2image.steffensenfamily.com/lists/ I'm the only person that can send anything to that list, and I only use it for version release announcements, so the traffic on it is very sparse and never spam.

Thanks,
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website