473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 2195
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.us> wrote in message
news:3T*******************@bgtnsc04-news.ops.worldnet.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.us> wrote in message
news:3T*******************@bgtnsc04-news.ops.worldnet.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********@nowhere.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.thinkbling.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
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...
31
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...
1
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...
9
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...
0
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...
6
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...
5
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: ...
1
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...
2
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.