I can do this (changing the new() call to accept $r). My understanding is that client code will need to be changed to take advantage of this, right? The other issue is that it will only work with the OO form of CGI, which many people (including myself) don't use.
I would prefer a more transparent way to obtain the current request. Is there no low-overhead way of getting at this? Lincoln On Thursday 13 March 2003 07:00 pm, Stas Bekman wrote: > One more issue with CGI.pm and mp2, and other modules as well. > > CGI.pm is using Apache->request. The setting/retrieval of the global > request record under threads is expensive, so the use of Apache->request is > deprecated in mp2. > > If CGI.pm can be changed to optionally accept $r (as an argument to new(), > plus a special accessor to set later) and use it instead, this will improve > the performance if Apache->request is not set. > > Notice that it's the enabling of 'PerlOptions +GlobalRequest' (it's on by > default with 'SetHandler perl-script') that is half of the performance hit > (store), and the actual use of Apache->request (get) is the second half. > > See: > http://perl.apache.org/docs/2.0/user/compat/compat.html#C_Apache_E_gt_reque >st_ http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_ > > __________________________________________________________________ > Stas Bekman JAm_pH ------> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com > http://modperlbook.org http://apache.org http://ticketmaster.com -- ======================================================================== Lincoln D. Stein Cold Spring Harbor Laboratory [EMAIL PROTECTED] Cold Spring Harbor, NY ========================================================================