Hi to everyone and thx to
mindeffects for noticing me!
This improvement is about changing three system settings keys for phpThumb:
- phpthumb_cache_maxage
- phpthumb_cache_maxfiles
- phpthumb_cache_maxsize
If you set all these three keys to
0, phpThumb will skip cleanup of thumbnails directory. This cleanup (done by method
CleanUpCacheDirectory() in file
\core\model\phpthumb\phpthumb.class.php) is really demanding on performance of MODX if there are lot of thumbnails (say hundreds).
When
phpthumbof output modifier (snippet) is used, in each use is called this cleanup method which iterate over all files in cache directory. Then if someone call phpthumbof on tens of images in one page and cache directory conaints 500 of images, then PHP make many unnecessary check of file size/date/count.
After change of these system settings you should think about cleanup of cache directory. Little bit of coding and use CRON should help.
Hope this make sense and will help to someone!
[ed. note: Hansek last edited this post 11 years, 3 months ago.]