Re: FAQ 3.19 How can I make my CGI script more efficient?



Purl Gurl wrote:
Brian Wakem wrote:

This is absolute pish-posh.  Apache running all bell and whistles (SSI etc)
will serve static pages *at least* 100 times faster than mod_cgi served
pages, and twice as fast as mod_perl served pages.

If this is not the case on your machine then you have serious config
problems.

I have done much benchmarking on these issues.

Honestly and truly? I believe you are full of mule manure.

URL measured:   http://www.purlgurl.net/~callgirl/index.cgi
  Page speed:   1.89 sec    (see details below)
  Compare to:   2.49 sec    (average speed of all our benchmarks)
[...]
URL measured:   http://www.purlgurl.net/~godzilla/index.html
  Page speed:   6.50 sec    (see details below)
  Compare to:   2.49 sec    (average speed of all our benchmarks)
[...]

Totally meaningless, since we don't know how you configured your Apache server. For example, did you know that it's possible to give your CGI scripts a file extension of .html, and your static HTML with a file extension of .cgi? Perhaps you could show us the source of the CGI script, whichever file it is, so someone could test them for you.

Frodo, however, doesn't believe that you'd think of doing that. More likely, he says, is that you have somehow disabled in-memory caching for HTML files, while your CGI files stay resident in memory. He suggests that showing us your http.conf file would likely be both informative and amusing.
.




Relevant Pages

  • Re: Want to create a website using perl and CGI
    ... Most CGI scripts I write don't hand back HTML. ... When you write a CGI script and the web server calls it and you send back "foobar" the web server complains because you did not send back a valid HTML header. ...
    (comp.lang.perl.misc)
  • Re: A new hobby
    ... I often use M$ Word to produce a quick page and then tweak the HTML if I need to. ... One of the nice things about HTML is that you can "view source" in most browsers to see how someone else has coded something. ... If you want to get into writing CGI scripts on the server (if your ISP will allow you to do that) things get as complex as you want. ...
    (soc.retirement)
  • Re: Boot Linux to an HTML Menu
    ... > I want to boot Linux directly to an HTML menu that I have prepared for ... cgi scripts through the server. ... I'm a console guy, so I use text scripts, ...
    (comp.os.linux.setup)
  • /cgi default path value
    ... the HTML pages are located in: ... the CGI scripts are located in: ... I have checked my apache installation, ... can you please recommend a newsgroup for running web servers on UNIX ...
    (comp.lang.perl.misc)