Author Topic: [Resolve] Admin Control Panel is heavy for server, how to lower loading?  (Read 4695 times)

0 Members and 1 Guest are viewing this topic.

Offline Joss

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • All about digital photography
Hello,

the ACP index page of my gallery loads server very much. I have > 5000 users, > 17000 images, > 2 Gb of images space.
Often I get "An unexpected error occured. Please try again later." while entering to ACP index page. But another pages in ACP loadings quickly.

So the my question is - can I hack something (remove some queries) in ACP index for resolve this problem? It seems to me there are some statistic queries which take a lot of time. I don't need "Who's online?" and "Top" information, and from "Stats" I need only how many images awaiting validation.
--------


Update: I did it myself. I insert some variables in the top of admin/home.php for tuning displayed info on home page.


Code: [Select]
$show_online_stat = 0;
$show_users_stat = 1;
$show_top_stat = 0;
$show_media_stat = 0;
$show_thumb_stat = 0;
$show_db_stat = 0;

And there is a modified admin/home.php for 1.7.7
« Last Edit: October 28, 2009, 01:17:30 PM by Joss »
Digital Photo Gallery: http://gallery.imagemaster.ru

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Resolve] Admin Control Panel is heavy for server, how to lower loading?
« Reply #1 on: October 28, 2009, 01:58:03 PM »
hi Joss ...

... you can also use this solution for a very fast acp-start : by splitting admin/home.php in "who is online" and "statistics" ...
... so you see after acp-start only "who is online" and can get "statistics" via acp-menu-link ...
... the code snippets ... here ...
... http://www.4homepages.de/forum/index.php?topic=16677.msg89250#msg89250 ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Joss

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • All about digital photography
Re: [Resolve] Admin Control Panel is heavy for server, how to lower loading?
« Reply #2 on: October 28, 2009, 03:33:51 PM »
Thank you, mawenzi,

it seems to me that get_dir_size() is very time heavy for large galleries.
Digital Photo Gallery: http://gallery.imagemaster.ru

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Resolve] Admin Control Panel is heavy for server, how to lower loading?
« Reply #3 on: October 28, 2009, 09:08:53 PM »
all,

change in admin/home.php

Code: [Select]
 echo "<td width=\"16%\"><b>".$lang['media_directory']."</b></td><td width=\"16%\">".format_file_size(get_dir_size(MEDIA_PATH))."</td>\n";to
Code: [Select]
 echo "<td width=\"16%\"><b>".$lang['media_directory']."</b></td><td width=\"16%\">*removed*</td>\n";
and
Code: [Select]
 echo "<td width=\"16%\"><b>".$lang['thumb_directory']."</b></td><td width=\"16%\">".format_file_size(get_dir_size(THUMB_PATH))."</td>\n";to
Code: [Select]
 echo "<td width=\"16%\"><b>".$lang['thumb_directory']."</b></td><td width=\"16%\">*removed*</td>\n";
because all images and thumb folders will be scanned for sizes.. that takes a while to sum all the sizes..

[EDIT]
but i see that you already did it.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi