[USE FIXED size,Increase cache size, Disable offsite images] phpThumb.php and extreamly slow loading website.

9 months 2 weeks ago - 9 months 2 weeks ago #71045 by nikolaikolev
Hello,
from a few weeks ago my website strart loading extreamly slow.
I send a request to my webhosting provider to investigate the reason for this.
the reply i got from it is:

"
We are hosting your website in one of the latest and fastest servers nowdays using All SSD technology. All your files and databases are stored on super fast SSD discs.
We have looked at your Raw Access logs for your site and we have noticed that the script "phpthumb.php" located in the directory:
public_html/components/com_flexicontent/librairies/phpthumb/phpThumb.php
is beeing executed numerous number of times and this is the reason for the website slow loading.
In the Access logs for 30.11.17 only, towards the script "phpthumb.php" are beeing executed over 2 millions hits (2203840)
"

My website is very new and there are not many visitors ( 20 - 30 unique visitors per day) so i do not believe that the reason is high number of visitors.
Is there any way this script "phpthumb.php" to be optimiced so the sait start loading faster ?

Please Log in or Create an account to join the conversation.

9 months 2 weeks ago - 9 months 2 weeks ago #71054 by ggppdk
Hello

first try this

1 . in universal module , and in copies of blog layout
select to use fixed thumbnails instead of custom size

2. increase phpthumb cache size,
default is only 200 MBytes, which may be too small for your website, thus the thumbnails are oftenre-created instead of being
retrieved by the cache

$PHPTHUMB_CONFIG = 200 * 1024 * 1024; // delete least-recently-accessed cached thumbnails when more than [200MB] of cached files are present (value is maximum bytesize of all cached files). Note: this only counts file size, does not count space "wasted" by directory entries in the cache structure -- see notes under $PHPTHUMB_CONFIG

Edit file:
components/com_flexicontent/libraries/phpThumb/phpThumb.config_OVERRIDE.php
add to it
$PHPTHUMB_CONFIG['cache_maxsize'] = 500 * 1024 * 1024;    // 500 MBytes
$PHPTHUMB_CONFIG['cache_maxfiles'] = 50000;     // 50000 files
$PHPTHUMB_CONFIG['nooffsitelink_enabled'] = true;   // Do not thumbnail non-local images


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

9 months 1 week ago #71069 by nikolaikolev
Hello,

1. is here the changes where i must choose fixed thumbnails instead of custom size (pic1 and pic2).
2. Am i going to loose all changes made to: components/com_flexicontent/libraries/phpThumb/phpThumb.config_OVERRIDE.php
after next flexicontent component update is being applyed
Attachments:

Please Log in or Create an account to join the conversation.

9 months 1 week ago #71070 by ggppdk
Hello

1. The file phpThumb.config.php is overwritten on FLEXIcontent upgrade
but file
phpThumb.config_OVERRIDE.php
is not lost after upgrade

2. about fixed size, you have configure it correctly, just do not use orginal image it is probably too large and it will slow down
the page download time, instead use 'medium' or 'large' thumbnail

(in future we will add HTML that will allow the client choose thumbnail size small, medium, large according to its screen width)

3. about fixed size, if you use 'extract from description text' then there is no thumbnail that is ready to be use, you will need to do 'resizing'


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

9 months 1 week ago #71074 by nikolaikolev
Hello,
i always use 'extract from description text' and resize option for the pics.
Do you think that if i reduse the amount of displayed content on the front page the problem will be solved.
For exapmle redusing the number of displayed items (with the universal module) by half on the front page.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.