After knowing a little about this image library and analyzing the question graph, I can comment on some possible causes of slowness...
Timthumb is always processing all images
This does not seem to be the case, since several lines of the graphics show only green bars, which means that time was spent on image transfer and no processing.
Note that it doesn’t make much difference the URL being tim.php
, provided that the library is only writing an image in cache to the exit as this is fast.
Anyway, make sure the images are being saved in the directory set up for caching. If they are not, adjust the script permission for the folder.
Timthumb is sending some header that prevents caching
Use the developer tool of your browser (F12?) to monitor the network and check whether, after accessing the same page a second time, the images will be loaded from the browser cache and not done the download again.
Your server is slow
Honestly, for some shared hosts, 5 seconds is up to a reasonable time for the level of processing your website seems to be using. I even use the Bluehost for my blog and, if it were not for the Wordpress cache plugins, the loading time could easily reach twice that.
Large number of downloaded files
Another factor seen in the chart is that there is a large number of downloaded elements in the page access. This also causes a negative impact, even if your network bandwidth is good, as browsers limit the number of simultaneous connections. The limit is usually between 2 and 6 connections (see this SOEN response).
However, this would be well mitigated in your case after the second access to the site, because at least the web fonts, styles and scripts would be cached in the browser. Of course the price would be paid on first access, but if the content is good it is worth it.
Completion
I’m inclined to think there’s no specific problem with Timthumb.
I would do some tests by placing still images and also checking if the browser can use the cache properly and load the page faster from the second access.
Finally, if the issue was performance, there are techniques to improve this, such as hiring a more powerful server or even more specialized cloud caching services.
Luiz just edited the question... rsrs
– utluiz
kkkk sorry. I’m still sleepy. :/
– Marcos Freitas