4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Joss on October 28, 2009, 12:31:06 PM
-
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.
$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
-
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 ...
-
Thank you, mawenzi,
it seems to me that get_dir_size() is very time heavy for large galleries.
-
all,
change in admin/home.php
echo "<td width=\"16%\"><b>".$lang['media_directory']."</b></td><td width=\"16%\">".format_file_size(get_dir_size(MEDIA_PATH))."</td>\n";
to
echo "<td width=\"16%\"><b>".$lang['media_directory']."</b></td><td width=\"16%\">*removed*</td>\n";
and
echo "<td width=\"16%\"><b>".$lang['thumb_directory']."</b></td><td width=\"16%\">".format_file_size(get_dir_size(THUMB_PATH))."</td>\n";
to
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.