Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Help prevent a ModPerl application from replacement by Java

by danmcb (Monk)
on Aug 30, 2005 at 13:25 UTC ( [id://487750]=note: print w/replies, xml ) Need Help??


in reply to Re: Help prevent a ModPerl application from replacement by Java
in thread Help prevent a ModPerl application from replacement by Java

be suspicious about Template::Toolkit too. Because it gives you the option of flow control in your templates, I wonder you are getting the full advantages of pre-compiled code that mod_perl should give.

Try CGI::FastTemplate instead - it's substitutions are pure regex subs, not as powerful, but plenty good enough for many purposes (you have to shift the flow control logic, if you are using it, somewhere into your application where it will get pre-compiled).

I think that if you are really using mod_perl to full advantage, you will be in a much better situation.

One problem you have is : are you comparing like with like? You have so many modules in there, if you really want to do a language comparison for raw speed, you should start with a very simple, raw perl app that connects to the db, and it's equivalent in java, compare them, then add layers onto each. Otherwise it is impossible to know what you are measuring.

http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html is well worth a read.
  • Comment on Re^2: Help prevent a ModPerl application from replacement by Java

Replies are listed 'Best First'.
Re^3: Help prevent a ModPerl application from replacement by Java
by perrin (Chancellor) on Aug 30, 2005 at 15:05 UTC
    Template Toolkit is really pretty fast. Since it compiles everything to perl opcodes, it should be about as fast as doing the same operation somewhere else in your code. The only big speed trap with it is using the dot notation to call methods, which will certainly be slower than simple variable lookups. People often do that when using Class::DBI with TT.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://487750]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found