perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Oxhøj <nicholas-modp...@oxhoej.dk>
Subject Re: "Streaming" compression of output from mod_perl handler?
Date Wed, 20 Feb 2002 13:16:34 GMT
> Sorry again. I've just checked sources and found that if mod_deflate
> received flush then it flushes both zlib and Apache.
> 
> You can try to set autoflush in perl module with $|=1;
> or call $r->rflush; when you like to flush output.

I just tried using $r->rflush in my handler and it works perfectly :-)
The output gets rendered on the fly and it barely hurts the compression ratio. The 430 KB
gets compressed to 26 KB instead of 24.5 KB :-) :-)

But wouldn't it be nice to have some mod_deflate option where you could specify that mod_deflate
should flush and send the currently compressed output every time it had received a certain
amount of input or every time it had generated a certain amount of output.

We are, for instance, using a template module to generate the output. We just give the template
module a data structure and a template, and it then goes away and fills in the template, outputting
HTML. This means that we don't have any easy way of calling flush at certain So we don't have
any easy way of calling rflush once in a while.

Of course we might just modify or substitute the template module, but it seems like a more
"automatic" kind of "streaming" deflating (like described above) would be nice to have.

Nicholas Oxhøj



Mime
View raw message