Minimising Server Resources

Started on the old forum in April 2008 · view the original in the archive · old links redirect here

4 replies · 495 views · started 18 years ago · 1 min read

4 participants
ReGzBk Developer · 115 posts #1

How can server resources be minimised ? wht shud be kept in mind while coding tht ensures script runs faster nd uses less server resources ??.. I have found few like using ' instead of " nd only using once print nd echo command nd use '. nd write consecutively wht else ? ..

ViSiT Ma SiTe Nd PoSt Ua CoMmEnTs On It In Ma PoSt

amylee Principal · 1,092 posts #2

if your on shared hosting i wouldnt bother changing anything as most probably another script on same server would probably be using a load of resources thus nulling any changes you make

GumSlone Administrator Principal · 1,690 posts #4

1.use " instead of ' because ' used as apostrophe in a string will give u error

have you tried a backslash ' before apostrophe in a string? it works

another thing try to reduce the mysql queries,

dont use **mysql select *** if you need to select only few rows from database. mysql count(*) is faster then mysql_num_rows use

echo 'Hello world';

instead of

echo "Hello world";

add variables like this in a string echo "Hello {$variable} world"; or echo 'Hello '.$variable.' world';

you can also install lighttpd or Nginx instead of apache

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

Guest #5

playing with sql command...one more thing if you host your own server play around with php pear...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close