Page 1 of 1

Page Execution Time

Posted: Thu Dec 08, 2005 10:40 am
by ed209
I have 2 pages that do exactly the same thing.

1) one does all the work on the page navigated to - thepage.php
2) the other uses a class included on - thepage.php

both pages use very similarly-coded functions, I started with option 1 and used it as a basis to create page 2 and its class.

------
The execution times are as follows:

page 1) 0.04 seconds

page 2) 0.06 seconds
------

so page 2 is 33% slower, however, as it uses a class it is much easier to use throught the site. So i guess the question is, should I compromise page development time over page execution time?

thanks for your thoughts!

Posted: Thu Dec 08, 2005 10:44 am
by onion2k
How busy is your site going to be? 0.02s is nothing to worry about .. unless you're getting 1,000,000 views a day..

Posted: Thu Dec 08, 2005 10:51 am
by ed209
I wish!!

per day I'd be happy with 2000 - 4000 visitors (not hits)

Posted: Thu Dec 08, 2005 10:59 am
by John Cartwright
I would never dream about not using a class, but were not going to get into that discussion. Perhaps some refactoring elsewhere could improve load times.

Posted: Thu Jan 05, 2006 9:58 am
by ed209
My page has now gone up to 0.12 seconds (running of my mac). I've expanded on my classes quite extensively which has meant I can develop and edit pages a lot quicker now but the downside is the longer execution time.

It may well be quicker on the server but I was wondering at what point do you have to re-think the way your developing the code ?

I randomly picked a 0.1 second limit before I would start to worry about it - but I've passed it now so I'd be grateful for any advice.

thanks
ed.