You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <sb...@iname.com> on 2000/02/24 15:50:01 UTC

Apache::GzipChain (was RE: [RareModules] Apache::OutputChain)

> I'm using it on a regular basis. Here's the config snippet:
> 
> Alias /majcd /usr/local/www/cgi/aef/majcd
> <Location /majcd>
> SetHandler "perl-script"
> Options +ExecCGI
> PerlHandler Apache::OutputChain Apache::GzipChain Apache::Registry
> </Limit>
> 
> It's really a regular Apache::Registry setup, except for the added
> modules in the PerlHandler line.

Eric, does Apache::GzipChain really work? Do you feel the difference? 
Should it be endorsed? 

I've this item in the guide but have never tried it myself. Doesn't it
slow down the respond time because it has to compress stuff, I know it
compress the stream as it arrives, but still it's a delay... Does size
matters? 

Obviously you want to do some internal buffering or calling print very
infrequently because if you send the output in small chunks the
compression will be quite bad as there will be no enough characters to do
reduce the size. 

Can anyone post the benchmarks?

Does anyone have the statistics for a percentage of clients supporting
application/x-gzip MIME type (which this module requires)? Well probably
the correct question is how many browsers set correctly the
Accept-Encoding header and its User-Agent headers. 

_______________________________________________________________________
Stas Bekman    mailto:sbekman@iname.com      http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC     http://www.stason.org/stas/TULARC
perl.apache.org    modperl.sourcegarden.org   perlmonth.com    perl.org
single o-> + single o-+ = singlesheaven    http://www.singlesheaven.com


Re: Apache::GzipChain (was RE: [RareModules] Apache::OutputChain)

Posted by Bill Moseley <mo...@hank.org>.
At 10:06 PM 02/24/00 +0100, Honza Pazdziora wrote:
>On Thu, Feb 24, 2000 at 09:38:57AM -0800, Bill Moseley wrote:
>> 
>> But I see this warning for each request, using the setup described in the
>> man page for Apache::GzipChain.[OutputChain debug below]
>> 
>> untie attempted while 1 inner references still exist at
>> /perl_lib/lib/site_perl/5.005/Apache/OutputChain.pm line 28.
>
>What perl -V is that?

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos sunsite 5.6 generic_105181-17 sun4u sparc
sunw,ultra-enterprise '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='gcc -B/usr/ccs/bin/', optimize='-O', gccversion=2.95.1 19990816
(release)
    cppflags='-I/usr/local/include'
    ccflags ='-I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldb -ldl -lm -lc -lcrypt
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under solaris
  Compiled at Dec 10 1999 15:28:27
  %ENV:

PERLLIB="/data/_g/lii/perl_lib/lib/site_perl/5.005:/data/_g/lii/perl_lib/lib
/site_perl/5.005/sun4-solaris:/data/_g/lii/perl_lib/lib/5.00503"
  @INC:
    /data/_g/lii/perl_lib/lib/site_perl/5.005
    /data/_g/lii/perl_lib/lib/site_perl/5.005/sun4-solaris
    /data/_g/lii/perl_lib/lib/5.00503
    /usr/local/lib/perl5/5.00503/sun4-solaris
    /usr/local/lib/perl5/5.00503
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.005
    .

Bill Moseley
mailto:moseley@hank.org

Re: Apache::GzipChain (was RE: [RareModules] Apache::OutputChain)

Posted by Honza Pazdziora <ad...@informatics.muni.cz>.
On Thu, Feb 24, 2000 at 09:38:57AM -0800, Bill Moseley wrote:
> 
> But I see this warning for each request, using the setup described in the
> man page for Apache::GzipChain.[OutputChain debug below]
> 
> untie attempted while 1 inner references still exist at
> /perl_lib/lib/site_perl/5.005/Apache/OutputChain.pm line 28.

What perl -V is that?

-- 
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
   .project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
------------------------------------------------------------------------

Re: Apache::GzipChain (was RE: [RareModules] Apache::OutputChain)

Posted by Ken Williams <ke...@forum.swarthmore.edu>.
moseley@hank.org (Bill Moseley) wrote:
>At 04:21 PM 02/24/00 +0100, you wrote:
>>Stas Bekman writes:
>>
>> > Eric, does Apache::GzipChain really work? Do you feel the difference? 
>>
>>I'm using Apache::GzipCHain and its speed increase (ie. download) is
>>dramatic, if the content is large and can be compressed :)
>
>I'd agree, it's fast.

It sounds to me like an Apache::Gzip module is in order.  It would be a simple
matter to write one that could be used either as a stand-alone for compressing
static files, or as a member of an Apache::Filter chain.

Anyone want to give it a shot?  It's only about a page's worth of code.  If
nobody does, I'll probably do it, but I can't promise when.




Re: Apache::GzipChain (was RE: [RareModules] Apache::OutputChain)

Posted by Bill Moseley <mo...@hank.org>.
At 04:21 PM 02/24/00 +0100, you wrote:
>Stas Bekman writes:
>
> > Eric, does Apache::GzipChain really work? Do you feel the difference? 
>
>I'm using Apache::GzipCHain and its speed increase (ie. download) is
>dramatic, if the content is large and can be compressed :)

I'd agree, it's fast.

But I see this warning for each request, using the setup described in the
man page for Apache::GzipChain.[OutputChain debug below]

untie attempted while 1 inner references still exist at
/perl_lib/lib/site_perl/5.005/Apache/OutputChain.pm line 28.


I also have not had much luck using it with RegistryNG.

<Files test>
 SetHandler perl-script
 PerlHandler Apache::OutputChain Apache::GzipChain Apache::RegistryNG->handler
 PerlSendHeader on        
</Files>

Which seems to send, but then I get "Communications exception (-336)" in
Netscape.

Back to work...



    Apache::OutputChain tied Apache::OutputChain -> Apache
untie attempted while 1 inner references still exist at
/perl_lib/lib/site_perl/5.005/Apache/OutputChain.pm line 28.
    Apache::OutputChain::TIEHANDLE ARRAY(0x6a0e00)
    Apache::OutputChain::TIEHANDLE ARRAY(0x615f74)
    Apache::OutputChain tied Apache::GzipChain -> Apache::OutputChain
untie attempted while 1 inner references still exist at
/perl_lib/lib/site_perl/5.005/Apache/OutputChain.pm line 28.
    Apache::OutputChain::TIEHANDLE ARRAY(0x37a78c)
    Apache::OutputChain::TIEHANDLE ARRAY(0x816d94)
    Apache::OutputChain::PRINT Apache::GzipChain=ARRAY(0x816d94)
    Apache::OutputChain::PRINT Apache::OutputChain=ARRAY(0x615f74)



Bill Moseley
mailto:moseley@hank.org

Re: Apache::GzipChain (was RE: [RareModules] Apache::OutputChain)

Posted by Dirk Lutzebaeck <lu...@aeccom.com>.
Stas Bekman writes:

 > Eric, does Apache::GzipChain really work? Do you feel the difference? 

I'm using Apache::GzipCHain and its speed increase (ie. download) is
dramatic, if the content is large and can be compressed :) Especially
true for larger tables or lots of HTML output in general. We have
implemented a database driven system with gives lots of tabular output
sometimes in the range of 50k - 200k HTML. It wouldn't be usable
without compression. The pages go down to a few kb and everybody is
surprised of the speed of the system. We hadn't had any problems with
current browser technology yet (ie. Netscape 4.x and IE 4.x, 5.x). So
if your html output is more than 5k you should use
Apache::GzipChain. It's a bit tricky to be used with embperl but if
somebody is interested send be a blurb.

Dirk