Hi Andrea,
Unfortunately, all the advantages of the WebP format regarding file size are negated by slow and energy-consuming processing.
Only in exceptional cases where a slow internet connection < 500 kbit is given (e.g. slow G3) this format makes sense.
The increased processing time correlates with increased energy consumption.
Measured with a commercial power meter on a local PC for one hour (multiple times).
Stack: Windows10, Java11, Tomcat9, Chrome Browser, OpenLayers Client, random WMS GetMap requests every 0.5 seconds
PNG 0.067 kWh vs. 0.071 kWh WebP vs. NoRequests 0.047 kWh.
The difference is small enough that you might overcome PNG by adopting the data extraction tricks
I pointed at in the PR, which we are currently using for the PNGJ output. In particular, check if the input image
is a BufferedImage, and if so, use getRaster() method instead of getData(): the latter is forced, by contract,
to return a deep copy of all the pixel values, while getRaster() provides the actual data buffer used by the image.
Also, try to identify cases where you can just do a System.arrayCopy or simply use the original byte, rather
than copying values around.
This will require changes into the Java webp library.
However, the WebP format could serve as an input format for the GWC and then play out the advantages again. I would like to tackle this next.
Makes sense, cached images are produced once and sent over the network multiple times, so the higher
energy cost of production is offsetted by the lower network transmission cost.
Cheers
Andrea
···
Regards,
Andrea Aime
==
GeoServer Professional Services from the experts!
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions Group
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
https://www.geosolutionsgroup.com/
http://twitter.com/geosolutions_it
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail