Author Topic: Making it faster  (Read 8282 times)

0 Members and 1 Guest are viewing this topic.

Offline Marino

  • Pre-Newbie
  • Posts: 2
    • View Profile
Making it faster
« on: June 16, 2002, 08:22:48 PM »
I looked at several sample galleries, they take a long time to load in Netscape 4.x (almost a minute) In IE they are OK.

One thing that would help pages load faster both in Netscape and IE is if you added "img src size atributes"
PHP can do this for you easily with
http://www.php.net/manual/en/function.getimagesize.php

Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag.
Example 1. getimagesize (file)

 <?php
$size = getimagesize ("img/flag.jpg");
echo "<img src=\"img/flag.jpg\" {$size[3]}>";
 ?>
If the image is 100x200, $size[3] will return:
height="100" width="200"

Offline sjau

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • http://www.wsjb78.com
Making it faster
« Reply #1 on: June 16, 2002, 09:38:23 PM »
it would probably increase the overall speed but I tend to think on a server with massive traffic it's an additional burden for the server to execute this extra command for every single picture... I'm not one of those performance gurus but that's what I think.

sjau

Offline TKE233

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://www.autke.com
Speed?
« Reply #2 on: June 17, 2002, 05:56:11 PM »
I am running on a 1Ghz server, with 1Gb of Ram, on a fiber connection to the phone company.  

You can check out my site, I don't think it is slow, but I would love some feedback...

http://www.autke.com/php/4images/

Offline Marino

  • Pre-Newbie
  • Posts: 2
    • View Profile
Making it faster
« Reply #3 on: June 17, 2002, 10:27:31 PM »
TKE233 your site loads very fast with IE. It's slow with Netscape.
The problem is not the IMG SRC tags cause it's slow even when there are no thumbnails to see.

For instance:
http://www.autke.com/php/4images/categories.php?cat_id=14

I also looked at your static HTML gallery pages such as
http://www.autke.com/pages/photogallery/RLC-2002-Clev/page_01.htm
which also don't use <IMG SRC> and they load very fast in both Netscape and IE. But I have DSL...
They would *seem* slow on someone on dial-up cause in Netscape without IMG SRC the page appears blank until ALL the thumbnails have been downloaded. When you have IMG SRC the thumbs appear one at a time as they download. In IE it's somewhat different. You do see the the thumbs incrementally but the screen keeps redrawing until ALL have downloaded.

I used to find this very annoying when I was on dialup , now with DSL I hardly notice it.

Marino

Offline Western Rhythm

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • http://www.westernrhythm.com
Making it faster
« Reply #4 on: June 18, 2002, 03:02:01 PM »
your site absolutely rips along on a 56k connection as well :)