Author Topic: Gallery VERY slow: Problem? Lots of users/images?  (Read 29503 times)

0 Members and 1 Guest are viewing this topic.

Offline cisiodon

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Slow
« Reply #15 on: June 07, 2003, 03:14:28 PM »
Make indexes in another tables in MYSQL and use ADOdb CAche to increase speed.

I am running with more than 4000 images and Powered by ADOdb !

Mike
http://www.netforum.com.br

Running PostNuke Multi Theme -  X-Forum - WebCam Portal - 4Images gallery
Banner Exchange 1:1
Paint Board on Line with Gallery and Blogs
Powered by AdoDB

I am not the owner of the world... But I am the son of it!

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #16 on: June 07, 2003, 03:36:19 PM »
cisidon: can u provide a brief description of how to do that or a link to a tutorial explaining steps needed to do that

Offline cisiodon

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Slow
« Reply #17 on: June 07, 2003, 03:44:09 PM »
Ya !!!

Below is an example hopw to use ADOdb ( http://php.weblogs/adodb) .

include("./pnadodb/adodb.inc.php");
 $ADODB_CACHE_DIR = 'd:\\temp';
 $db = NewADOConnection('mysql');
 $db->Connect("your_host", "user", "password", "Your_Database");
 if (isset($cache)) $rs = $db->CacheExecute(120,'select * from nuke_modules');
 else $rs = $db->CacheExecute('select * from nuke_modules');


 if (isset($cache)) $rs = $db->CacheExecute(120,'select * from nuke_postwrap_url');
 else $rs = $db->CacheExecute('select * from nuke_postwrap_url');


 if (isset($cache)) $rs = $db->CacheExecute(120,'select * from nuke_blocks');
else $rs = $db->CacheExecute('select * from nuke_blocks');


 if (isset($cache)) $rs = $db->CacheExecute(120,'select * from nuke_xforum_forums');
else $rs = $db->CacheExecute('select * from nuke_xforum_forums');

 if (isset($cache)) $rs = $db->CacheExecute(120,'select * from nuke_xforum_posts');
else $rs = $db->CacheExecute('select * from nuke_xforum_posts');

 if (isset($cache)) $rs = $db->CacheExecute(120,'select * from nuke_xforum_threads');
else $rs = $db->CacheExecute('select * from nuke_xforum_threads');

while (!$rs->EOF) {
$rs->MoveNext();
}


===============================
This  i am using with PostNuke, and to 4Images you change The Database, Tables you wish caching. You can also Cache All PIC_ID !!!

Insert this lines in index.php AT the BEgin after <? php .....


Regards from Brazil !!

Mike
Here caching about 120 Sec. Tables nuke_etc_etc....
http://www.netforum.com.br

Running PostNuke Multi Theme -  X-Forum - WebCam Portal - 4Images gallery
Banner Exchange 1:1
Paint Board on Line with Gallery and Blogs
Powered by AdoDB

I am not the owner of the world... But I am the son of it!

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #18 on: June 07, 2003, 03:48:33 PM »
thanks but where do i get the ("./pnadodb/adodb.inc.php) file from?

its not built into the gallery is it?

Offline cisiodon

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Slow
« Reply #19 on: June 07, 2003, 03:56:17 PM »
You can get it at http://php.weblogs.com/adodb and download the latest version ( 270K ) .

Mike
http://www.netforum.com.br

Running PostNuke Multi Theme -  X-Forum - WebCam Portal - 4Images gallery
Banner Exchange 1:1
Paint Board on Line with Gallery and Blogs
Powered by AdoDB

I am not the owner of the world... But I am the son of it!

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #20 on: June 07, 2003, 04:02:26 PM »
thanks!! will try it out now. hopefully it will make adiference cause my gallery is growing too fast. have around 3000+ pics and 50 vids.

and around 2000 members

Offline cisiodon

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Slow
« Reply #21 on: June 07, 2003, 04:19:13 PM »
Good Luck !!

Mike
http://www.netforum.com.br

Running PostNuke Multi Theme -  X-Forum - WebCam Portal - 4Images gallery
Banner Exchange 1:1
Paint Board on Line with Gallery and Blogs
Powered by AdoDB

I am not the owner of the world... But I am the son of it!

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #22 on: June 07, 2003, 04:49:02 PM »
DAMN!! safe mode error!!

does this work with safe mode!

i managed to by pass safe mode for the actuall gallery.

any way to do it for this adodb script?

Offline cisiodon

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Slow
« Reply #23 on: June 07, 2003, 06:00:14 PM »
I my system I did not see this error.

If you set the TEMP dir for CAche you must give READ/WRITE permissions to it.

Mike
http://www.netforum.com.br

Running PostNuke Multi Theme -  X-Forum - WebCam Portal - 4Images gallery
Banner Exchange 1:1
Paint Board on Line with Gallery and Blogs
Powered by AdoDB

I am not the owner of the world... But I am the son of it!

Offline cisiodon

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Slow.
« Reply #24 on: June 07, 2003, 06:09:34 PM »
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: index.php                                            *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7                                                  *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/




include("./pnadodb/adodb.inc.php");
$ADODB_CACHE_DIR = 'd:\\temp';
$db = NewADOConnection('mysql');
 $db->Connect("xxx.xxx.xxx.xxx", "Any", "error", "4images");
 
if (isset($cache)) $rs = $db->CacheExecute(14400,'select * from 4images_images');
 else $rs = $db->CacheExecute('select * from 4images_images');
if (isset($cache)) $rs = $db->CacheExecute(72000,'select * from 4images_categories');
else $rs = $db->CacheExecute('select * from 4images_categories');
if (isset($cache)) $rs = $db->CacheExecute(3600,'select * from 4images_sessions');
 else $rs = $db->CacheExecute('select * from 4images_sessions');
if (isset($cache)) $rs = $db->CacheExecute(7200,'select * from 4images_comments');
else $rs = $db->CacheExecute('select * from 4images_comments');
if (isset($cache)) $rs = $db->CacheExecute(14400,'select * from 4images_sessionvars');
 else $rs = $db->CacheExecute('select * from 4images_sessionvars');
if (isset($cache)) $rs = $db->CacheExecute(14400,'select * from 4images_users');
 else $rs = $db->CacheExecute('select * from 4images_users');

while (!$rs->EOF) {
$rs->MoveNext();
}


This is my insert in index.php of 4images.
All cached are saved in \\temp dir ( windows machine ) /tmp dir ( *nix )



Mike
http://www.netforum.com.br

Running PostNuke Multi Theme -  X-Forum - WebCam Portal - 4Images gallery
Banner Exchange 1:1
Paint Board on Line with Gallery and Blogs
Powered by AdoDB

I am not the owner of the world... But I am the son of it!

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #25 on: June 07, 2003, 07:35:59 PM »
yeah mine is exactly same!

but problem is with safe mode my host uses.

the cache directory is also read/write chmod to 777

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #26 on: June 07, 2003, 08:11:02 PM »
OK i think i solved it!! i just deleted the cache folders and created them again and chmod to 777.

same as the gallery solution for safe mode

i see files in each folder. gallery does seem faster.

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #27 on: June 09, 2003, 06:46:22 PM »
ok gallery seems faster slightly. any other suggestions guys!

im aiming to make this thread a kind of reference for all users of 4images to speed up their gallery.

so come on guys plz respond on how to make gallery run faster

Offline cisiodon

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Slow
« Reply #28 on: June 09, 2003, 06:52:17 PM »
Make another indexes of tables into MYSQL database..

Mike
http://www.netforum.com.br

Running PostNuke Multi Theme -  X-Forum - WebCam Portal - 4Images gallery
Banner Exchange 1:1
Paint Board on Line with Gallery and Blogs
Powered by AdoDB

I am not the owner of the world... But I am the son of it!

Offline rohanrohanrohan

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Gallery VERY slow: Problem? Lots of users/images?
« Reply #29 on: June 09, 2003, 11:00:23 PM »
oops sorry csidon. how can i do that in brief.