viewLastUpdatedAlbumsFrom producing delay when loading viewLastUpdatedAlbumsFrom producing delay when loading
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

viewLastUpdatedAlbumsFrom producing delay when loading

Started by capecodgal, April 06, 2008, 05:00:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

capecodgal

I am not sure if this is an issue with my server handling the request or the script itself.

Example: www.hayden-collective.net
(part that says Last Photo Updates in the sidebar about halfway down)
Gallery Link:  www.hayden-collective.net/gallery


Code used is in an iframe called through wordpress:


$options = array('windowtarget' => '_blank',"imagewidth"=>"80");
$objCpm->cpm_viewLastUpdatedAlbumsFrom("cat=66,67,17,75,115,116,112,72,113,68,119,104,111:album=0",2,3,$options);
$objCpm->cpm_close();



As you can see it seems to take quite a while to load (about 20-30 seconds) due to that one fetch being called... before adding that one I used just the viewLastAddedMedia and it loaded much faster then this even wit the Random and RandomMostViewed calling many more categories than this one instance. At first I had used many more categories on this one as well and was having issues with the server timing out on the request so I dropped it to less than 15 categories and its at least loading now but seems terribly slow. My gallery has almost 25,000 images and over 100 categories. Could this be an issue with my server handling that request or would it possibly be something in the script itself? Only reason I think that is because the other calls are using many more categories (about 50) and it loaded fine before adding the AlbumsFrom function

Thanks for any direction you can offer-


capecodgal

One more thing I'll add; I thought maybe there could be something else in the page causing the delay so I tried just loading the php file with the code and its the same exact thing:

Link: http://hayden-collective.net/wp-content/themes/hc_am2m/latest_albums.php

Code:


$options = array('windowtarget' => '_blank',"imagewidth"=>"80");
$objCpm->cpm_viewLastUpdatedAlbumsFrom("cat=66,67,17,75,115,116,112,72,113,68,119,104,111:album=0",2,3,$options);
$objCpm->cpm_close();





Now look at how fast the Random Photos loads and this is calling more categories than the first script:

Link:
http://hayden-collective.net/wp-content/themes/hc_am2m/randm_photos.php

Code:


$objCpm->cpm_setfilter($filter = ".jpg");
$options = array('windowtarget' => '_blank',"imagewidth"=>"80");
$objCpm->cpm_viewRandomMediaFrom("cat=2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60:album=0",2,3,$options,$filter);
$objCpm->cpm_close();

Nibbler

Calculating the last updated albums is a difficult sql query - it takes time with lots of data.

capecodgal

gotcha I was thinking it had to be something along those lines but wanted to be sure I wasn't missing anything

I'll just use LadtAddedMedia on this site and I can use the UpdatedAlbumsFrom on other sites with smaller galleries; this is my largest gallery don't know why I felt the need to try it out there first...

Thanks!