do you mean this least ?
//define('4IMAGES_ACTIVE', 1);
to
define('4IMAGES_ACTIVE', 1);
if well I made this already 2 weeks ago, my gallery is very fast.
Now I have only "slow" problem with the forum, I use the same that thise but is so slow on my website.