Arjan van Staalduijnen wrote:
>> Another is that it can be tied in with the protocol cache
>> (it might not be wise to spend cpu on compressing dynamic answers).
>It might depend on the kind, or amount of data whether or not it is
>worthwhile compressing a dynamic answer, and depending on the definition
>is less worthwhile if it is not protocol cached afterwards. I think it
>can all be done in a filter module, where some hooks at the protocol
>level might help (but not even sure if necessary).
I tend to agree with Arjan here, the compression actually is rather
lightweight compared to the other tasks of the server. In my gzip-on-the-fly
implementation I actually skip compressing if the document is smaller than
1KB (since then there is a good chance that it will fit uncompressed into
a single IP packet with header and all), and for the rest I only compress
text/* mimetypes, which avoids compression on any gif/jpeg/pdf which should
be the bulk of the data.
--
Sincerely,
Stephen R. van den Berg.
Real programmers don't produce results, they return exit codes.
|