Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0377EF88 for ; Wed, 5 Dec 2012 03:58:28 +0000 (UTC) Received: (qmail 12106 invoked by uid 500); 5 Dec 2012 03:58:28 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 11937 invoked by uid 500); 5 Dec 2012 03:58:26 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 11879 invoked by uid 99); 5 Dec 2012 03:58:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 03:58:24 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [207.172.157.102] (HELO smtp02.lnh.mail.rcn.net) (207.172.157.102) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 03:58:13 +0000 Received: from mr16.lnh.mail.rcn.net ([207.172.157.36]) by smtp02.lnh.mail.rcn.net with ESMTP; 04 Dec 2012 22:57:52 -0500 Received: from smtp04.lnh.mail.rcn.net (smtp04.lnh.mail.rcn.net [207.172.157.104]) by mr16.lnh.mail.rcn.net (MOS 4.3.4-GA) with ESMTP id CCT19180; Tue, 4 Dec 2012 22:57:52 -0500 X-Auth-ID: anat Received: from pool-173-70-92-11.nwrknj.fios.verizon.net (HELO [192.168.1.8]) ([173.70.92.11]) by smtp04.lnh.mail.rcn.net with ESMTP; 04 Dec 2012 22:57:52 -0500 Message-ID: <50BEC63F.7070304@aldan.algebra.com> Date: Tue, 04 Dec 2012 22:57:51 -0500 From: "Mikhail T." User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120820 Thunderbird/14.0 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: What happens, when a CGI program is invoked? Content-Type: multipart/alternative; boundary="------------040206070200060208080109" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------040206070200060208080109 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello! From my (limited) investigation, it would appear, that in order to invoke a vanilla CGI script, httpd is created and goes through all of the modules' initialization and then, immediately, clean-up functions... Is that right? Some of these callbacks are fairly heavy and, in most cases, the init/destroy cycle is useless... Both websh and mod_rivet, for example, seem to initialize a Tcl-interpreter first only destroy it afterwards -- completely pointless, when a CGI-script is invoked. Perhaps, it is possible to somehow bypass entering all/most of the modules, when processing a CGI request? Thanks! -mi --------------040206070200060208080109 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello!

From my (limited) investigation, it would appear, that in order to invoke a vanilla CGI script, httpd is created and goes through all of the modules' initialization and then, immediately, clean-up functions...

Is that right? Some of these callbacks are fairly heavy and, in most cases, the init/destroy cycle is useless... Both websh and mod_rivet, for example, seem to initialize a Tcl-interpreter first only destroy it afterwards -- completely pointless, when a CGI-script is invoked.

Perhaps, it is possible to somehow bypass entering all/most of the modules, when processing a CGI request? Thanks!
-mi
--------------040206070200060208080109--