visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: speeding things up


By: roe1and Great Britain  Date: 01/02/2008 11:21:40  English French  Points: 20 Status: Answered
Quality : Excellent
i'm making an assumption here:

if (whatever) {
do this
and that
and that
}

am i correct in saying that php will do this and that and that before it returns your page, sorry i think this might be a stupid question. i think the answer is yes. so i think my actual question is then can i speed this process up?
By: VGR Date: 01/02/2008 18:47:21 English  Type : Comment
yes, the answer is yes. in all 3rd G languages (and others), when you open a BLOCK, it is a container for more than one instruction ; even BASIC has kind of a block. As in Pascal, C or the like, when your consition is followed byonly one instruction, the block is not required (it may even complicate reading) such as in if (condition) do_stuff; else do_other_stuff;

the only difference with other language is the instruction terminator (;) before the else, whereas more intelligent language grammars ban it.

I'm not sure to have addressed your issue, but the complete form of the if..then..else is :


if (whatever) {
// whole set of instructions
} else {
// other set
}
By: VGR Date: 01/02/2008 18:49:09 French  Type : Answer
how do you want to "speed up" things ? If you programmed a set of (required) instructions, then they need to execute. You can't speed them up if they have to follow each other!

if you programmed useless instructions you now want to skip and "display the page", it's an other problem ;-)
By: roe1and Date: 04/02/2008 12:33:16 English  Type : Comment
thanks vgr. i think i have found the problem. i'll post it as a new question.

Do register to be able to answer

EContact
browser fav
page generated in 338.347200 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page