PDA

View Full Version : What affects EE's speed?


seanspeng
16th of October 2002 (Wed), 07:53
My EE gallery becomes slow lately compared when I first set it up several months ago. I have about 400 pictures in all galleries. Does anyone know what affect EE's speed? I think my web hosting delivers decent speed.

More pictures, slower performance?
or
should I try to put pictures into different galleries instead of one?

Thank you,

Pekka
16th of October 2002 (Wed), 08:38
Hi Sean,

EE speed is not dependent on how many photos there are, unless you have set it to check existence of each thumb, in which case EE will "contact" each thumb before displaying it:

Check that you have

When image file is not found:
"3. Use EE's substitute error image for main photos only (normal performance)"

selected in misc settings.

Setting 2 in that dialog can be really fast in fast servers, but it can slow things down a lot if server runs out of RAM and PHP's statcache does not work correctly.

For long list pages the amount of html code can get big. In 1.3 you have an option to reduce that considerably, plus EE 1.3 will use several speeding methods like page buffering and load distribution. GZip on-the-fly html code compression if also used if gzip is available on server. This will make it opening pages in 1.3 _very_ fast. I have done comparisons with 1.22 and 1.3 is 400-800% faster in opening page source codes when all speeding options are in use.

One but (in small databases) not so significant cause for slowdown can be MySQL table indexing, for which I have in 1.3 an utility script that will sort all indexes out to speed them up - also EE Backup will do index "cleanout" on restore so full speed is achieved instantly.

More speed issues can come from server - Apache uses RAM to cache pages, and if RAM runs out it will slow page serving a lot. Each HTTP connection in Apache takes by default 8MB or RAM and to speed up the page loading Apache usually opens several of those connections for one page - but if there is no RAM left and default setup for these extra connections is "customized" you may end up slowing it instead of speeding it, especially in high traffic sites. In Apache you have several settings for controlling creation of those processes and memory usage - but you can set them only if you're a sysadmin in your server.

I have seen the best servers acting up really strangely - servers need good care and a reboot from time to time - also updating PHP to latest stable version from time to time is very recommended. Too bad many virtual server companies don't update any software with request. One big problem with virtual servers is that server rack holds usually dozens of sites and you can one day have there a site that eats all resources form other sites - and it's practically impossible to do anything about it.

PS. This server is 1GHz Duron machine with 512MB RAM, and in couple of days I'll move photography-on-the.net to a new 1.7GHz Pentium IV server.

PPS. The mp3 in your gallery will slow page loading for sure. Maybe it's better to offer a link to it instead of loading it automatically.

seanspeng
16th of October 2002 (Wed), 14:11
Pekka wrote:
Hi Sean,

Check that you have

When image file is not found:
"3. Use EE's substitute error image for main photos only (normal performance)"

selected in misc settings.

Setting 2 in that dialog can be really fast in fast servers, but it can slow things down a lot if server runs out of RAM and PHP's statcache does not work correctly.


I tried out three settings and did not see much difference. It varies from 4 seconds to 7 seconds. I am a little confused on why you are not recommending setting 1, but 3? Shouldn't 1 be faster than 3?




For long list pages the amount of html code can get big. In 1.3 you have an option to reduce that considerably, plus EE 1.3 will use several speeding methods like page buffering and load distribution. GZip on-the-fly html code compression if also used if gzip is available on server. This will make it opening pages in 1.3 _very_ fast. I have done comparisons with 1.22 and 1.3 is 400-800% faster in opening page source codes when all speeding options are in use.


That sounds like a dream, Pekka! Can't wait! If the speed is significantly improved in the new version, this EE is perfect in my eye. Thanks for your great work!



PPS. The mp3 in your gallery will slow page loading for sure. Maybe it's better to offer a link to it instead of loading it automatically.



For the mp3, I have the following settings:
AUTOSTART = FALSE
LOOP = 0

If it does not autostart the music and merely give the viewer an option to click "play", it should not slow down the page loading. --- Am I right on this one?

The speed of loading the Gallery Index page is extremely fast. WHAT'S REALLY SLOW is after I enter specific gallery and view them in NORMAL size by clicking one by one (next), it is slow to fully display the next picture. I have a cable modem. Any thought on this?

Thank you,

Pekka
16th of October 2002 (Wed), 14:41
seanspeng wrote:
I tried out three settings and did not see much difference. It varies from 4 seconds to 7 seconds. I am a little confused on why you are not recommending setting 1, but 3? Shouldn't 1 be faster than 3?


1. affects nothing
2. affects all photos
3. affects photo.php's large photo only.

For the mp3, I have the following settings:
AUTOSTART = FALSE
LOOP = 0

If it does not autostart the music and merely give the viewer an option to click "play", it should not slow down the page loading. --- Am I right on this one?


I have to see about that that later, but now when I entered your list page the mp3 was downloaded automatically, but not played back! This was in IE6.

The speed of loading the Gallery Index page is extremely fast. WHAT'S REALLY SLOW is after I enter specific gallery and view them in NORMAL size by clicking one by one (next), it is slow to fully display the next picture. I have a cable modem. Any thought on this?

I had once this kind of a slowdown problem and it was related to complexity of Apache and PHP communication - that was one of the reasons I added feature called output buffering as standard to 1.3.

Try this:
in list.php in very beginning of the file replace

--------------------

seanspeng
16th of October 2002 (Wed), 14:55
Pekka wrote:

I have to see about that that later, but now when I entered your list page the mp3 was downloaded automatically, but not played back! This was in IE6.

Right. The function of AUTOSTART = FALSE is to enable viewers to see the plugin player, but the music does not play back unless the viewer click the "Play" button. So if it does not playback, then there is no data transfer for that 3MB mp3 file, right?

[quote]
I had once this kind of a slowdown problem and it was related to complexity of Apache and PHP communication - that was one of the reasons I added feature called output buffering as standard to 1.3.

Try this:
in list.php in very beginning of the file replace

--------------------