On Fri, Aug 7, 2020, 06:30 Andras Sali <[email protected]> wrote:
> Hi Nick, > > Yes, thanks, I am aware that guacd already can use WebP if it's available. > However if I see correctly, it is only used for **lossy compression** - the > lossless flag is set to 0 ( > > https://github.com/apache/guacamole-server/blob/master/src/common/surface.c#L1794 > ). > > WebP also supports lossless compression using a separate algorithm ( > > https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification > ), > which would be a direct alternative for PNG updates. In the benchmark I > linked in my previous email, lossless webP encoding can be faster and more > efficient for many types of images than PNG (question if this is also the > case for screen updates). > > So I understand that guacd already intelligently switches between PNG / > WebP Lossy depending on different metrics, however my question is regarding > using WebP Lossless instead of PNG. In this case the switching would be > between WebP Lossless and / WebP Lossy depending on the metrics. > > Has this already been tried and discarded for some reason? > Yes, waaayyy back when WebP support was first finding its way into Guacamole, prior to the project moving to the ASF. There were mixed results in our own testing, showing that WebP would often compress worse and slower than PNG, resulting in increased latency and bandwidth usage. There was also a mysterious issue where libwebp would effectively ignore the lossless quality setting and produce lossy images. By now, this may no longer be a problem, however I suspect the negative performance characteristics relative to PNG will still be there. If you would like to give it a try, by all means see whether things do improve, however the answer to your question is "yes, lossless WebP was investigated and ultimately rejected due to poor performance characteristics compared to PNG." - Mike
