PHP versus Perl for server load?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DesignGuy

    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?



  • Ian.H

    #2
    Re: PHP versus Perl for server load?

    On Fri, 09 Apr 2004 19:34:38 +0000, DesignGuy wrote:
    [color=blue]
    > 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?[/color]


    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


    Comment

    • Finding Best Hosting

      #3
      Re: PHP versus Perl for server load?

      which two scripts are you comparing? there are about 5-6 in php and 3 in
      perl.

      [color=blue]
      > I've read comparison of Perl vs. PHP regarding features and coding,[/color]
      however[color=blue]
      > 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?
      >
      >
      >[/color]


      Comment

      • DesignGuy

        #4
        Re: PHP versus Perl for server load?


        "Finding Best Hosting" <hosting@us.u s> wrote in message
        news:3TJdc.5341 $i74.100444@bgt nsc04-news.ops.worldn et.att.net...[color=blue]
        > which two scripts are you comparing? there are about 5-6 in php and 3 in
        > perl.[/color]


        MrRats's Perl Script
        ThinkBling's PHP script



        Comment

        • Deal Finder

          #5
          Re: PHP versus Perl for server load?

          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?

          [color=blue]
          >
          > "Finding Best Hosting" <hosting@us.u s> wrote in message
          > news:3TJdc.5341 $i74.100444@bgt nsc04-news.ops.worldn et.att.net...[color=green]
          > > which two scripts are you comparing? there are about 5-6 in php and 3 in
          > > perl.[/color]
          >
          >
          > MrRats's Perl Script
          > ThinkBling's PHP script
          >
          >
          >[/color]


          Comment

          • thumb_42@yahoo.com

            #6
            Re: PHP versus Perl for server load?

            DesignGuy <dontbother@now here.com> wrote:[color=blue]
            > 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.[/color]

            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

            Comment

            • ThinkBling

              #7
              Re: PHP versus Perl for server load?

              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.

              Great Deals on Brand Name Cars, Trucks, Cell Phones, Jewelry, Electronics, Video Games and More. A Better Way to Shop eBay.

              For all that is BLING!
              An Amazon search alternative

              Comment

              Working...