Posted by J.O. Aho on 10/13/79 11:43
strawberry wrote:
> I know it's difficult to say too much without providing the script and
> hardware info but I was just wondering if anyone had any general tips
> about improving the speed at which the page displays.
Don't use echo/print for all HTML output, if you have large amount of HTML
then do it outside the PHP.
Run web-server and sql-server on the same machine.
Connect to the sql-server in the beginning of the script, keep the connection
alive until you finished all SQL queries.
Avoid fetching a lot data from the sql-server, do as much "sorting" in your
SQL queries and limit the number of rows fetched to the amount you need.
Don't use banners from a lot of external sites.
Don't connect form a host that has a bad ping-time to the web-server.
//Aho
[Back to original message]
|