Gallery 3 Performance

CWhitmer
CWhitmer's picture

Joined: 2010-01-21
Posts: 34
Posted: Tue, 2014-01-14 15:03

I have been using Gallery3 for a little over a year with the Greydragon theme. It works well, but the performance between pages seems a little slow. I am worried that people are very impatient and will leave the site, rather than wait 3-5 sec. for page changes when clicking on albums.

Does anyone have some general advice on where I can look to increase performance and decrease the amount of time between page changes?

The site is http://whitmerdecks.com/gallery3/

Thanks for all your help and thanks in advance for help on this matter.

Cliff

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2014-01-14 21:30

Your mention the grey dragon theme. Same issue with the default theme?
How about any modules that could possible be the issue.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
CWhitmer
CWhitmer's picture

Joined: 2010-01-21
Posts: 34
Posted: Wed, 2014-01-22 15:31

Thanks floridave. I do have quite a few modules installed that are not being used. Is it enough to uncheck them in the Gallery Modules page, or should I delete the module folder as well? Not sure if the folder being there will cause the server to have to look at it with each query.

One other question. I use the Album Tree module to provide a quick list of the albums. It works well, but I would like to sort the album alphabetically. The albums currently show up the order they are added and there is no option to sort them. Do you know of a way to sort, or is there another module I could use?

Thanks for your help
Cliff

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-01-22 16:04

Just unchecked the module should suffice. Kohana does look through the folders but I don't think it would benifit much more than a few milliseconds.
I'm not sure about the album tree modjule but would assume it takes the sort order of the album in question to do its list. Try to rearrange an album and see if that works. If not then I guess some code could be added to the module to change the sort order.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
CWhitmer
CWhitmer's picture

Joined: 2010-01-21
Posts: 34
Posted: Wed, 2014-01-22 16:18

Thanks Dave,
You are correct the album tree is displayed in the same order as the album.

Can you point me in the direction of how to add code to control the order of the tree independent of the album?

Cliff

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-01-22 17:45

I have not tested but if you can see if it works or not. In the view (not sure what view you are using) there is:
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){

I think the child function can take a 4th perameter; 'sort'. So something like:
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
would become
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album")), array("column" => "order")) as $child){
Where "column" would be the column you want to sort by like: "id"
and where "order" would be the order you want to sort like: "ASC".

Try:
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album")), array("id" => "ASC")) as $child){

like I said I have not tested it.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
CWhitmer
CWhitmer's picture

Joined: 2010-01-21
Posts: 34
Posted: Wed, 2014-01-22 21:00

Your the man Dave!

Worked Perfect.
The list is now ordered by name with the 4th parameter changed as you suggested.

The Orginal line was:
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album")))
New line is:
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album")), array("title" => "ASC"))

Thanks for the help.
I made a donation.

Cliff