Igor,<br><br>We need to do a release for Fedora Core and their Perl 5.10 dependency, so I&#39;ve reverted the gzip patches until we can finish this discussion.<br><br>I do want to see it go in, but it&#39;ll need some cleanup first in addition to design/code review.&nbsp; (for instance, while reverting it, I noticed a mismatch of spaces and tabs... see <a href="http://danga.com/commit.bml">http://danga.com/commit.bml</a>) <br>
<br>- Brad<br><br><div class="gmail_quote">On Thu, Mar 6, 2008 at 6:20 AM, Igor Gariev &lt;<a href="mailto:igor.gariev@sup.com">igor.gariev@sup.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">










<div link="blue" vlink="blue" lang="RU">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Guys,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">the compression feature
is for _<i><span style="font-style: italic;">concatenated</span></i>_ files only.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Surely, no one would
compress file at every request if it can be done beforehand. </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">The concatenated output
is in a way a dynamic content, since names of files to be concatenated are
known at run-time only.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">The caching of the output
is problematic too, since if the number of files is N then there are 2^N
possible combinations that may be requested.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">To create a compressed
stream from pre-compressed files is not possible too, since though gzip
algorithm allows for several frames in stream, some popular browsers (IE 6.0,
FF 2.0) don't understand such streams and display the first compressed
frame only.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">The more info can be
found here: <a href="http://torrez.us/archives/2007/09/24/550/" target="_blank">http://torrez.us/archives/2007/09/24/550/</a> (thanks to Brad Whitaker
for the link).</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Regards,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Igor Gariev.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">PS. Thanks for Apache
config for static files, it's amazingly simple and effective.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> <a href="mailto:perlbal-bounces@lists.danga.com" target="_blank">perlbal-bounces@lists.danga.com</a>
[mailto:<a href="mailto:perlbal-bounces@lists.danga.com" target="_blank">perlbal-bounces@lists.danga.com</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Brad Fitzpatrick<br>
<b><span style="font-weight: bold;">Sent:</span></b> Thursday, March 06, 2008
4:56 AM<div class="Ih2E3d"><br>
<b><span style="font-weight: bold;">To:</span></b> <a href="mailto:perlbal@lists.danga.com" target="_blank">perlbal@lists.danga.com</a><br>
</div><b><span style="font-weight: bold;">Subject:</span></b> Re: GZip compression in
Perlbal</span></font></p>

</div><div><div></div><div class="Wj3C7c">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Exactly!&nbsp; That&#39;s the
approach I always planned to take with adding gzip support to Perlbal...
parallel pre-compressed files.&nbsp; Then just check the modtimes must be
newer.<br>
<br>
I&#39;m against the idea of doing it at serve-time.&nbsp; If it _must_ be done at
serve time, I&#39;d like to see a Perlbal-owned directory (separately configured)
that holds the on-the-fly compressed files for future Perlbal requests to
re-use.<br>
<br>
I don&#39;t like all the extra code and complexity that this on-the-fly version
adds.&nbsp; Seems like a maintenance problem for a solution that&#39;s not even
ideal anyway.<br>
<br>
The concatenated resource support in Perlbal lays the groundwork for doing
multiple parallel stats at request time, so reusing that to parallel stat the
normal and .gz version would be a good start and should add very little new
code.<br>
<br>
- Brad</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Wed, Mar 5, 2008 at 5:16 PM, Brad Fitzpatrick &lt;<a href="mailto:brad@danga.com" target="_blank">brad@danga.com</a>&gt; wrote:</span></font></p>


<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Exactly!&nbsp; That&#39;s the approach I always planned to take with adding
gzip support to Perlbal... parallel pre-compressed files.&nbsp; Then just check
the modtimes must be newer.<br>
<br>
I&#39;m against the idea of doing it at serve-time.&nbsp; If it _must_ be done at
serve time, I&#39;d like to see a Perlbal-owned directory (separately configured)
that holds the on-the-fly compressed files for future Perlbal requests to
re-use.<br>
<br>
I don&#39;t like all the extra code and complexity that this on-the-fly version
adds.&nbsp; Seems like a maintenance problem for a solution that&#39;s not even
ideal anyway.<br>
<br>
The concatenated resource support in Perlbal lays the groundwork for doing
multiple parallel stats at request time, so reusing that to parallel stat the
normal and .gz version would be a good start and should add very little new
code.</span></font></p>

<div>

<div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br>
</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Wed, Mar 5, 2008 at 1:20 PM, Ask Bjørn Hansen &lt;<a href="mailto:ask@develooper.com" target="_blank">ask@develooper.com</a>&gt;
wrote:</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
On Mar 5, 2008, at 11:18, Mark Smith wrote:<br>
<br>
&gt; The idea is then that these small files are just stored in memory and</span></font></p>

</div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&gt; we don&#39;t have to
re-gzip them every time [...]<br>
<br>
What I do (with Apache) is pre-compress the files and have Apache just<br>
send the &quot;.gzip&quot; file when it&#39;s there.<br>
<br>
&nbsp; </span></font><span lang="EN-US">AddEncoding gzip .gzip<br>
<br>
&nbsp; RewriteCond %{HTTP:Accept-Encoding} gzip<br>
&nbsp; RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}.gzip -f<br>
&nbsp; RewriteRule ^(.*)$ </span>$1.gzip [L]<br>
<br>
Compressing static files at request time seems slightly insane ...<br>
<br>
<br>
&nbsp;- ask<br>
<font color="#888888"><span style="color: rgb(136, 136, 136);"><br>
--<br>
<a href="http://www.askbjoernhansen.com/" target="_blank">http://www.askbjoernhansen.com/</a><br>
<br>
</span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</div>

</div>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</div></div></div>

</div>


</blockquote></div><br>