On Mon, 2009-06-15 at 19:45 +0200, Rudi Ahlers wrote: > On Mon, Jun 15, 2009 at 6:48 PM, John R Pierce<pie...@hogranch.com> wrote: > > Rudi Ahlers wrote: > >> What I meant was, PHP talks to PHP script engine, which talks to > >> Apache, which then talks to system commands. - is there a quicker way > >> of doing it? > > > > um, thats somewhat mixed up. user -> browser -> apache -> php that > > interprets your script -> OS function > > > > with a native compiled language like C++, its user -> browser -> apache > > -> compiled C++ binary -> OS function > > > > not really -that- different, as theres far more overhead in all the rest > > of the process than in the actual script or program,unless its doing > > something very computationally intensive. > > > > also note, PHP is a preloaded module, while your C++ program probably > > gets forked on every webpage, unless you write it as an apache > > module... ooops. > > > > _______________________________________________ > > > Thanx John, I didn't think about it this way :)
But do keep in mind that only the data space and certain system-related structures must be duplicated, all in memory, when this fork occurs. Text and instruction space is not duplicated (it's shared by all instances) and the same is true for underlying librariy code, like glib*. The possibility of multiple threads also exists to affect that. So the hit on performance will be very small. I don't know how this compares to things like PHP, having never had the interest, opportunity, ... to become familiar with it. > <snip> -- Bill _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos