in reply to mod_perl vs CGI: benchmarks and code

It's a no-brainer, if you're worried mainly about performance. Basic story: mod_perl embeds a perl interpreter in Apache. No starting up a separate perl interpreter when you start a CGI script! Secondly, Apache::DBI allows database connection pooling, and pretty intelligently. It's a *big* speed gain, but there is increased memory usage.

If you code cleanly, and follow the guidelines you've already read, you shouldn't have much of a problem. Eventually, the thing to do is move away from thinking in terms of CGI scripts and writing mod_perl handlers; then, basically, you've got a big suite of Perl apps that groks HTTP ... mondo powerful. Why, you could even write a great website around that sort of technology!

perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'

Replies are listed 'Best First'.
Re^2: mod_perl vs CGI: benchmarks and code
by Anonymous Monk on Jan 02, 2010 at 22:11 UTC
    Contrary to the w3c advise you shouldnt use em for font sizes, and you should rather use px. Reason 1: If you use em then as screens become more advanced with better resultion and bigger sizes then you font gets smaller as in the examples on this page. Reason 2: People with eye proplems set their screen res smaller because they want the text to get bigger - thats the whole point of screen res. Eugene
      Both em and px will shrink as the resolution increases. The difference is that em is based on the user's preferred font size and is thus a better choice from the user's point of view.

      This is exactly backwards. Increasing screen resolution makes pixels smaller on the screen. All modern operating systems and browsers have type display controls independent of screen resolution and that's how those with special requirements should handle it.