FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-16-2006, 06:28 AM   Postid: 148301
apm
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jan 1999
Location: Madras
Posts: 98
coding optimization and performance

Hello guys,

was just wondering whether execution of 5000 lines of code based in a class whihc is called in every file does it take a lot of processing time ?

All the functions are not used everytime but cvertainly form part of the class.

The class file size is 400 kb.

so would it make a difference and reduce the lag time in showing the web page if I were to lets say break down the classes and and only load ones that are neccessary.

Or the server can handle it with ease without any substantial difference in lag times (10 secs or more difference, right now the page takes any where betoween 30 secs to 90 secs to load ).

just try to time it www.arc-max.com/yabadoo/

let me have your opinions.

thanks
apurva m
apm is offline   Reply With Quote
Old 05-16-2006, 06:37 AM   Postid: 148302
 Arthur
Developer
 
Arthur's Avatar
 
Join Date: Nov 2000
Location: The Netherlands
Posts: 2,212
Re: coding optimization and performance

Quote:
Originally Posted by apm
was just wondering whether execution of 5000 lines of code based in a class whihc is called in every file does it take a lot of processing time ?
Quote:
Originally Posted by apm
Or the server can handle it with ease without any substantial difference in lag times (10 secs or more difference, right now the page takes any where betoween 30 secs to 90 secs to load ).
You have answered your own question. The script takes unacceptably long to finish. Pages that take that long should not be run on a shared server and are a violation of the Terms of Service.

-Arthur
__________________
http://www.FutureQuest.net/
Arthur is offline   Reply With Quote
Old 05-16-2006, 07:52 AM   Postid: 148304
apm
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jan 1999
Location: Madras
Posts: 98
Re: coding optimization and performance

well i was trying ot figuiring out waht the problem is is it with my coding or with the server....

becuase if it is with the server then eeven if i break it up to smaller bits it still would be 1000 lines of code.. then will your server be handle it ??? or do we stick to plain html sites which od not tax the server ????


thanks
Apurva M
apm is offline   Reply With Quote
Old 05-16-2006, 08:11 AM   Postid: 148305
 Arthur
Developer
 
Arthur's Avatar
 
Join Date: Nov 2000
Location: The Netherlands
Posts: 2,212
Re: coding optimization and performance

If the script consistently takes 30 to 90 seconds to run and other pages don't, you can safely say it's the script and not the server.

I have not done any profiling on the script, or even seen the script, so I can't comment on why it takes so long. All scripts are not alike, some can be very large, but use very little resources, and vice versa.
I'd recommend doing profiling on your code to see where delays occur and see if the code can be optimized.

-Arthur
__________________
http://www.FutureQuest.net/
Arthur is offline   Reply With Quote
Old 05-16-2006, 08:12 AM   Postid: 148306
apm
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jan 1999
Location: Madras
Posts: 98
Re: coding optimization and performance

oh just wanted to make it clear that we are not using futurequest o run the service a we are programing for one of our clients. This was merely to test how the code works on linux machine and it iwll most probably be on a stand alone machine....


it is not a continous test also just when we do the updates and need oto show it to our client...

so dont pull the trigger yet

thanks
apurva m
apm is offline   Reply With Quote
Old 05-17-2006, 01:03 AM   Postid: 148347
Matt
Site Owner
 
Matt's Avatar

Forum Notability:
671 pts: Dignified Competence!
[Post Feedback]
 
Join Date: Nov 2000
Location: Birmingham, AL, US
Posts: 1,231
Re: coding optimization and performance

Quote:
was just wondering whether execution of 5000 lines of code based in a class whihc is called in every file does it take a lot of processing time ?
The number of lines of code is not the determining factor in how resource intensive the script is. It will depend upon how many of those lines are typically executed and what those lines are doing. As an example, 1 line of code (infinite loop) would be sufficient to cause excessive runtimes. There are factors that contribute to a perceived long runtime as well, such as a complex (or poorly coded) SQL query or a script that embeds a large file (such as a graphic). In short, neither total lines of code nor download time are accurate indicators of actual CPU utilization.

-Matt
__________________
Webspace Creations
Matt is offline   Reply With Quote
Old 05-17-2006, 01:20 AM   Postid: 148348
apm
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jan 1999
Location: Madras
Posts: 98
Re: coding optimization and performance

Thank you for your inputs.

Would like to know how does one go about doing a "profiling of codes" so that we can try to dtermine whihc part of code may require rrethinking....are there any tools availble ???

thanks
Apurva M
apm is offline   Reply With Quote
Old 05-17-2006, 01:33 AM   Postid: 148349
 Bruce
Developer
 
Bruce's Avatar
 
Join Date: Apr 2001
Location: Saskatoon, SK, Canada
Posts: 1,182
Re: coding optimization and performance

Quote:
Originally Posted by apm
Would like to know how does one go about doing a "profiling of codes" so that we can try to dtermine whihc part of code may require rrethinking....are there any tools availble ???
I haven't tried it personally, but this appears to be a functional free PHP profiling system, and a good place to start looking.
__________________
Bruce Guenter, FutureQuest http://www.FutureQuest.net/ http://untroubled.org/
Bruce is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 01:14 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.