FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Including PHP scripts on same server
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Including PHP scripts on same server [message #171932 is a reply to message #171926] Fri, 21 January 2011 20:18 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 1/21/2011 12:08 PM, Leonardo Azpurua wrote:
>
> "jwcarlton" <jwcarlton(at)gmail(dot)com> escribió en el mensaje
> news:5f96a08e-f405-4008-b37e-1fef85b66ecf(at)l24g2000vby(dot)googlegroups(dot)com...
>>> Why does it matter. If you're that concerned about speed of execution,
>>> why are you using php in the first place? You should code your site in
>>> C.
>>
>> That's actually a very good question. If I were a better C programmer,
>> I probably would :-)
>
> :-)
>
> I am above anything else a C programmer. In fact, my first approach to
> web development was a set of C programs that ran as CGI.
>
> It is fine if you host your own domain, but with many hosting providers,
> allowing your own binaries to run is some sort of anathema.
>
> With most OSs, the most consuming operations in file handling are
> "opens", so, yes, it is likely that splitting a large file into several
> small units will add a significant overhead to your script's execution
> time.
>

That's true in compiled languages, but not so much in interpreted
languages such as PHP. Unlike in compiled languages, the interpreter
spends a fair amount of time parsing the scripts and converting them to
instructions the processor can execute. So the overhead of opening a
file is much smaller than in compiled programs.

Additionally, if the file is accessed quite often, it is probably in the
OS's file buffers already (especially if it is read only), so the
overhead is even less.

Not to say that there isn't overhead in opening a file - but it's a very
small percentage of the total time in PHP scripts. There are better
places to look for improvements.

> But if one compares the development time required to navigate and
> maintain a large source file against the time required to open the
> specific file with the specific functions that you have to work with, it
> is likely that the overall life cycle of your program will improve by
> using simpler, smaller units.
>

Very true.

> "Overhead", with modern equipment and OSs, may be safely neglected
> except in the most critical applications.
>
> --
>

Also quite true.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ElephantMark - a new simple tool for PHP documentation
Next Topic: hack
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 16:33:31 GMT 2024

Total time taken to generate the page: 0.05024 seconds