What config controls should compression have?

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi all:

I am finishing up the patches to allow the roundup server to compress
responses to clients. It supports:

  * on the fly compression of dynamic data (html template output,
    error messages ...) with gzip. Brotli and zstd are supported if
    the packages are installed.
  * pre-compressed static assets (uses @@file in the url) using gzip,
    brotli or zstd (even if python packages are not installed) will be
    used if provided.

I am working on the config.ini settings for this. I am planning at
this time to provide only two:

  [web]
  use_precompressed_files = No
  dynamic_compression = Yes

The defaults are as above. use_precompressed_files turns on/off
the search for precompressed file when a static asset is requested.  I
use No as the default since it requires the admin to make the
compressed files (e.g. style.css -> style.css.gzip, style.css.br,
style.css.zstd) and keep them up to date. No sense scanning the
directories for the files unless requested.

Also many people set up the internet facing server in front of roundup
(e.g. nginx) to do the compression. They intercept /@@file/ url's and
have the front server perform compression for static assets. Roundup
never sees these url requests.

On the fly compression is controlled by dynamic_compression. It can be
turned on or off. On is the default since gzip is available by default
with no special work by the admin. If the admin is using nginx or
other upstream server (uwsgi) that can compress dynamic pages on the
fly, it can be turned off.

Does anybody have a use case where selecting individual compression
algorithms for dynamic compression is required? I figured that using
virtualenv allows the admin to only install compression algorithms they
want to use, so there is no need to control this in the config.ini file.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.