Exactly! That's the approach I always planned to take with adding gzip
support to Perlbal... parallel pre-compressed files. Then just check
the modtimes must be newer.<br><br>I'm against the idea of doing it at
serve-time. If it _must_ be done at serve time, I'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't like all the extra code and complexity that this on-the-fly
version adds. Seems like a maintenance problem for a solution that'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<br><br><div class="gmail_quote">On Wed, Mar 5, 2008 at 5:16 PM, Brad Fitzpatrick <<a href="mailto:brad@danga.com">brad@danga.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Exactly! That's the approach I always planned to take with adding gzip support to Perlbal... parallel pre-compressed files. Then just check the modtimes must be newer.<br>
<br>I'm against the idea of doing it at serve-time. If it _must_ be done at serve time, I'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't like all the extra code and complexity that this on-the-fly version adds. Seems like a maintenance problem for a solution that'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.<div>
<div></div><div class="Wj3C7c"><br>
<br><br><div class="gmail_quote">On Wed, Mar 5, 2008 at 1:20 PM, Ask Bjørn Hansen <<a href="mailto:ask@develooper.com" target="_blank">ask@develooper.com</a>> 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><br>
On Mar 5, 2008, at 11:18, Mark Smith wrote:<br>
<br>
> The idea is then that these small files are just stored in memory and<br>
</div>> we don'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 ".gzip" file when it's there.<br>
<br>
AddEncoding gzip .gzip<br>
<br>
RewriteCond %{HTTP:Accept-Encoding} gzip<br>
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}.gzip -f<br>
RewriteRule ^(.*)$ $1.gzip [L]<br>
<br>
Compressing static files at request time seems slightly insane ...<br>
<br>
<br>
- ask<br>
<font color="#888888"><br>
--<br>
<a href="http://www.askbjoernhansen.com/" target="_blank">http://www.askbjoernhansen.com/</a><br>
<br>
<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>