Re: [gupnp] enable gzip compression for action responses



On Mon, 2010-06-21 at 15:21 +0300, Zeeshan Ali (Khattak) wrote:

> > I think I'd be happiest with version checks and conditional enabling.
> 
>   I think we can just bump the deps since even libsoup 2.30 is already
> in distros. Same goes for glib since you are not bumping it beyond
> 2.24?

libsoup 2.28.2 and glib 2.24.0 are the requirements for this patch. 

> >> (3) How should this feature be controlled at run-time? We could
> >>     for example not enable the SOUP_TYPE_CONTENT_DECODER feature
> >>     by default and leave this up to the user of the gupnp library.
> >>     But we could check if it is enabled on the SoupSession, and
> >>     if it is, set the "Accept-Encoding" header. Or is there an
> >>     established way to enable/disable certain features in GUPnP
> >>     at run-time?
> >
> > Default to on, provide an API somewhere to disable for apps that want it
> > off, and an environment variable that hits that API for debugging?
> 
>   Can't this be on demand somehow? i-e only compress if client asks
> for compression?

It is on-demand, of course. Only if the client sets the
"Accept-Encoding" header in the action call will the response be
encoded. But the patch currently sets this header unconditionally for
all actions. IMO it does not make sense to allow to enable/disable this
on a per-action basis. But it might make sense to enable/disable it
globally for a particular GUPnP context.

There is a tradeoff between CPU usage and bandwidth usage here.
Compression dramatically reduces the bandwidth that is being used, but
it puts some burden on the CPU of the server and the client. On a device
with very limited CPU resources that is connected over ethernet, using
compression might even result in a slight slow-down.


Sven


--
To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]