473,554 Members | 3,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP versus Perl for server load?

I've read comparison of Perl vs. PHP regarding features and coding, however
I would like to know how each affects server load.

I am looking at two scripts - one in Perl and the other in PHP - for the
Amazon Product Feed. My understand is that Perl must be compiled on each
execution and that PHP does not, therefore PHP is less of a load on the
server.

Comments, anyone?

Jul 17 '05 #1
6 2210
On Fri, 09 Apr 2004 19:34:38 +0000, DesignGuy wrote:
I've read comparison of Perl vs. PHP regarding features and coding, however
I would like to know how each affects server load.

I am looking at two scripts - one in Perl and the other in PHP - for the
Amazon Product Feed. My understand is that Perl must be compiled on each
execution and that PHP does not, therefore PHP is less of a load on the
server.

Comments, anyone?

This is normaly the case.. unless the Perl version is written for mod_perl
which acts like PHP (if installed as an ISAPI module).

I don't have any benchmarks to offer or the likes.. but if a "normal" Perl
script, it invokes a copy of Perl everytime the script is executed.

Others may have better info.. but I haven't used Perl for Web development
for years.

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #2
which two scripts are you comparing? there are about 5-6 in php and 3 in
perl.

I've read comparison of Perl vs. PHP regarding features and coding, however I would like to know how each affects server load.

I am looking at two scripts - one in Perl and the other in PHP - for the
Amazon Product Feed. My understand is that Perl must be compiled on each
execution and that PHP does not, therefore PHP is less of a load on the
server.

Comments, anyone?

Jul 17 '05 #3

"Finding Best Hosting" <ho*****@us.u s> wrote in message
news:3T******** ***********@bgt nsc04-news.ops.worldn et.att.net...
which two scripts are you comparing? there are about 5-6 in php and 3 in
perl.

MrRats's Perl Script
ThinkBling's PHP script

Jul 17 '05 #4
I tried both scripts, and did not like either.

Thinkbling sucks. Don't use it.
The layout is not so good. And it uses popup for reviews and descriptions.
But I think they use a MySQL for saving downloading from amazon every time.

mrrat is ok, but Perl is really not for HTML programming. Perl is great for
back end stuffs. Do you see how long the cgi is? 129K. wow. In PHP, it only
takes 20k at most. mrrat has a amazon cash file, but I am not sure how often
it refreshes it.

I think Php is faster for complicated processes. I did a test on 2 simple
location redirect scripts. Perl is faster 0.6 second than PHP 0.8 second
from start to finish. I think it is not mod_perl, because I did a ENV test,
and there is no Mod_Perl mentioned. I guess PHP's regular expression etc is
slower, but the start process is faster, and takes less memory, so in long
run, PHP kicks ass. But PHP has too many bugs.

By the way, do you see anything similar for ebay? Would it be nice to search
amazon and ebay together?


"Finding Best Hosting" <ho*****@us.u s> wrote in message
news:3T******** ***********@bgt nsc04-news.ops.worldn et.att.net...
which two scripts are you comparing? there are about 5-6 in php and 3 in
perl.

MrRats's Perl Script
ThinkBling's PHP script

Jul 17 '05 #5
DesignGuy <do********@now here.com> wrote:
I've read comparison of Perl vs. PHP regarding features and coding, however
I would like to know how each affects server load.

I am looking at two scripts - one in Perl and the other in PHP - for the
Amazon Product Feed. My understand is that Perl must be compiled on each
execution and that PHP does not, therefore PHP is less of a load on the
server.


I believe that is false. I *used to* believe PHP only had to be
compiled once, but have been informed that unless using commercial
products, PHP is compiled each time, just like perl.

PHP's advantage is that the interpreter doesn't need to be loaded each
time, while vanilla perl needs to load /usr/bin/perl AND compile the
perl script. (perl syntax is a bit more, shall we say.. 'complex'.. so
I'd imagine perl's parse & compile step is a little more expensive)

At least, thats my understanding of PHP "today". I could be wrong, it
would be nice if the compiled version were cached some place.

mod_perl is typically faster than PHP because it can store compiled code
(and data structures) but.. mod_perl is less stable and not as available
as PHP. (mod_perl doesn't work too good when the web server needs to be
shared between multiple users) Mod_perl is also a LOT more difficult to
"get right". (database handles, stale variables and making sure
any HTML templates take advantage of a compiled cache)

Generally, I've found PHP to be faster than perl except with mod_perl.

For really really serious stuff, I'd check into Servlets/JSP or
mod_perl. For wider availability or smaller scale, I've found PHP
better.

Jamie

Jul 17 '05 #6
If something about ThinkBling.com' s scripts "Sucks" we would like to hear about.

forums.thinkbli ng.com is an open discussion.

The description pop-ups are being reconsidered.

www.ThinkBling.com
For all that is BLING!
An Amazon search alternative
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2422
by: Preslopsky | last post by:
I am currently evaluating what language I should use to create a web interface to some of our databases. I am purely in the fact finding stage at this point, having no website nor database set up yet. This is sort of a new area for me, so I am looking for some advice. Part of our organization has Cold Fusion running on its web server. It...
31
4736
by: surfunbear | last post by:
I've read some posts on Perl versus Python and studied a bit of my Python book. I'm a software engineer, familiar with C++ objected oriented development, but have been using Perl because it is great for pattern matching, text processing, and automated testing. Our company is really fixated on risk managnemt and the only way I can do enough...
1
2925
by: Albert van der Horst | last post by:
I am trying to do some web scripting in Forth This is a transcript of the perl example from O'Reilly (Gundavaram) CGI-programming pg. 17. With the multiple line strings and the occasional auxiliary word, it looks neater than perl IMO. However, no environment variables can be accessed from the script apparently. The corresponding perl...
9
4505
by: Dieter Vanderelst | last post by:
Dear all, I'm currently comparing Python versus Perl to use in a project that involved a lot of text processing. I'm trying to determine what the most efficient language would be for our purposes. I have to admit that, although I'm very familiar with Python, I'm complete Perl noob (and I hope to stay one) which is reflected in my questions....
0
2379
by: Envex Developments | last post by:
Hey guys, I have a need to install the DBD::Pg Perl module on many shared web servers, which do not have PostgreSQL installed. Then the DBD::Pg module will just connect to a remote PostgreSQL database, hosted elsewhere. I'm having some problems doing this. First off, I modified the Makefile.PL, and added the three following links just...
6
2989
by: surfivor | last post by:
I may be involved in a data migration project involving databases and creating XML feeds. Our site is PHP based, so I imagine the team might suggest PHP, but I had a look at the PHP documentation for one of the Pear modules for creating XML and it didn't look like much. I've used Perl XML:Twig and I have the impression that there is more Perl...
5
1894
by: Andrew Hedges | last post by:
Wherein I attempt to debunk some myths about the relative merits of the two methods for programmatically adding content to a web page: http://www.newfangledtelegraph.com/blog/entry/the-need-for-speed-innerhtml-versus-dom-manipulation/ Cheers, -Andrew ----- andrew@hedges.name / http://andrew.hedges.name/
1
47381
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or...
2
3796
by: sbettadpur | last post by:
hello, I am trying to install the Text::NLP::Stanford::EntityExtract perl module on windows xp. But its not installing properly... can anybody tell solution for the above problem. But its installing successfully on Linux machine. The following error i was getting while installing.......
0
7583
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7783
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8019
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6127
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5424
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5143
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1115
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.