Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Reduce loading time of index.php  (Read 6857 times)

0 Members and 1 Guest are viewing this topic.

itang

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 63
Reduce loading time of index.php
« on: June 17, 2006, 04:42:50 pm »

I have a gallery with 400,000 pictures and 8000+ members, it takes a long time (10s+) to load the index.php.

Everytime when members login, logout, upload, create albums... they fallback to index.php. It not only takes a long time but also make a huge demand on sql server.

Is it anyway to make a very light index.php? I only need login/out, my album link in the index page.

Thanks everybody!
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Reduce loading time of index.php
« Reply #1 on: June 17, 2006, 11:46:36 pm »

as described before you can disable "Random Pics" on your index.php to reduce CPU load (MySQL Load)also you can remove some un wanted block from index by going:
admin mode=>config=>Album list view=>The content of the main page
for more info read docs
Logged
‍I don't answer to PM with support question
Please post your issue to related board

itang

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 63
Re: Reduce loading time of index.php
« Reply #2 on: June 18, 2006, 04:38:18 am »

Thanks for your reply. I have already disable all blocks except ablist for the index page. It still takes a long time to load the page.

I am thinking of making a brand new index.php with only login / logout (which can show the name of user if one login) and my albums (which link directly to member album).

Anyone can help me if i want to include these two function into a page?

Thanks a lot!
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Reduce loading time of index.php
« Reply #3 on: June 18, 2006, 04:57:26 am »

Put what you want into anycontent.php, then put only 'anycontent' in the "content of the main page".

Here's a simple login box I have in anycontent:
Code: [Select]
<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

if (!
USER_ID) {
starttable("100%""Welcome");

?>

<tr><td class="tableb" >
<form method="post" name="loginbox" action="login.php?referer=index.php">
<p class="MsoNormal" align="left">
Username: <input class="textinput" name="username" style="width: 65;height:17" tabindex="1" type="text">
Password: <input class="textinput" name="password" style="width: 79;height:17" tabindex="2" type="password">
<input name="submitted" class="button" value="Login" tabindex="4" type="submit">
</form>
</td></tr>
<?php
endtable();
}

?>

It's simple because I use that above the rest of the "content of the main page".  You might want to add a register and forgot password link.  You can check Coppermine's login.php for that.  And for the "My Gallery" link, format the HTML however you like and then add the appropriate link.

Otherwise, there have been other threads that discuss creating cached snapshots of certain pages and blocks for high-traffic sites like yours.  I don't think anyone implemented such a thing, but I might be wrong.  It would take some work to do this, but it shouldn't be that difficult.

Maybe your simple index page will do the trick.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Reduce loading time of index.php
« Reply #4 on: June 18, 2006, 09:36:56 am »

the two thingies on the index that burn most resources are the random block and the statistics. I've written a solution on how to speed up the statistics. You can check the code in the modpack. Or you can just disable statistics. On huge gallery this gives serious improvement. Deleting the menu and stuff... not worth the effort
(I'm talking about the '2949 files in 120 albums and 11 categories with...')


Also having as less as possible categories on the index helps.
You can disable category stats as well (the numbers next to the categories)

This needs code modification
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.