Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

FASTER PERL (velocigen velometer mod perl or Perl Server Pages)

by virtualweb (Sexton)
on Nov 28, 2007 at 02:38 UTC ( #653457=perlquestion: print w/ replies, xml ) Need Help??
virtualweb has asked for the wisdom of the Perl Monks concerning the following question:

Hi: Im writing a Community Portal (MySQL driven templetized CMS 90 % completed). This portal will have to handle a high traffic demand. Im told that perl is an interpreted language and for that matter every request is slower than if the CMS were to be written in PHP, Python, .NET, ASP, etc.. The thing is that Im not a programmer.. neither I intend to become one. I taught myself perl through books and online tutorials only to write one application.. and Im happy with my moderate command of the language. As a matter of fact I completed 90 % of the job already. But I fear that what I wrote might freeze on account of too much traffic. Got some books that suggest methods of turbo charging my application. In other words if I undrstood corretly my code can be quasy compiled with the help of VELOMETER, VELOCIGEN, PERL SERVER PAGES, OR MOD PERL. I would rather get information and adapt my code to work with one of the solutions above mentioned than learning a whole new language from scratch. Any suggestions, input.. pointers... links to solutions, etc, will be appreciated.

Comment on FASTER PERL (velocigen velometer mod perl or Perl Server Pages)
Re: FASTER PERL (velocigen velometer mod perl or Perl Server Pages)
by jettero (Monsignor) on Nov 28, 2007 at 03:26 UTC

    mod_perl may be overkill. It depends on how detailed you want to get. But for my part, I find that I get very high performance from mod_fcgid using CGI::Fast. It really isn't too much different than CGI. I doubt php could do much better, but I'm not about to try it either, so who knows.

    cheers.

    -Paul

Re: FASTER PERL (velocigen velometer mod perl or Perl Server Pages)
by perrin (Chancellor) on Nov 28, 2007 at 03:39 UTC
    Most of those are long-gone. These days you would either use mod_perl of FastCGI. Anyone who tells you that PHP or Python are significantly faster than perl running on mod_perl or FastCGI is not well-informed. (Perl is fast enough for Amazon...)

    You may discover that your application is slow, due to beginner mistakes in your code. If that happens, read up on profiling and come back here for help.

Re: FASTER PERL (velocigen velometer mod perl or Perl Server Pages)
by sundialsvc4 (Abbot) on Nov 28, 2007 at 04:25 UTC

    Ummm... Let's just focus our attention upon what you want to accomplish here. You want to accomplish “a community portal,” and you judge that your efforts are “90% completed,” and your concern is that “your site might freeze.”

    Very well. My advice to you is:   cross that bridge when-and-if you get there.

    If you unhappily-discover that the tool or method that you have selected cannot meet your site's demand, then, I say, (and only then) “you have a problem.”

    Until then, drink beer.

Re: FASTER PERL (velocigen velometer mod perl or Perl Server Pages)
by Your Mother (Canon) on Nov 28, 2007 at 04:54 UTC

    Are you familiar with the expression, "Time to pay the price?" If you wrote a CMS from scratch and you are, as you say, not a programmer with no wish to become one, I can all but guarantee that it will have serious security issues in addition to performance problems that will not keep up with high traffic (100,000+ dynamic views per day?).

    Are you familiar with the expression, "The last 10% of a project takes 90% of the time?" You may be a long way from finishing. Consider spending an entire day Googling and reading through other software and projects to see if what you want is already done by someone else. I'm all for reinventing the wheel for one's own edification but if you try to do it for a real, busy site your first time outta the blocks, success is not in the cards.

    If you do finish or want to get more serious about it, update your Perl library with some fresh tomes and ask one specific question at a time here. As perrin said, FastCGI (Perl interface: FCGI) is great. Modperl is great but you need root or an amazingly permissive webhost to run it. FastCGI is generally as fast as modperl but not as complex to work with. Many hosts are running it now, largely because of Rails. Catalyst supports CGI, modperl, FastCGI and more for its server engine. It's got a learning curve but a lot of out of the box components for DBs and UI are complete and stable.

    Lastly, anything positive you hear about PHP, well, try some rock salt.

    update: eliminated an extra "s."

Re: FASTER PERL (velocigen velometer mod perl or Perl Server Pages)
by chrism01 (Friar) on Nov 28, 2007 at 06:43 UTC

      It's probably 90% as fast as C for string analysis and list building... But compare their function call stacks once. Then it's only about 1% as fast as C.

      -Paul

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://653457]
Approved by gam3
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-23 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls