Languages :: PHP :: speeding things up |
|||
| By: roe1and |
Date: 01/02/2008 11:21:40 |
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 | 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 | 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 | 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 |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








