Skip to content

GSIP 100

Jody Garnett edited this page Jul 12, 2017 · 1 revision

GSIP 100 - merge fast pure java PNG encoder as default PNG encoder

Overview

Merge the new, fast, pure java PNG encoder as the default PNG encoding option for trunk. Add options to choose the encoder from the GUI.

Proposed By

Andrea Aime

Assigned to Release

2.5.0

State

Choose one of: Under Discussion, In Progress, Completed, Rejected, Deferred

Motivation

Have the best PNG encoding out of the box performance for GeoServer users of any platform

Proposal

The current PNG encoding in GeoServer can be delegated to two different encoders:

  • The one built into the JDK, which provides the best compression (not tunable) at a very high performance price
  • The native ImageIO one, which provides faster performance and allows for tunable compression levels (but providing significantly larger outputs). This encoder is available only when the user installs the ImageIO native extensions, which in turn are available only for Linux 32 and 64 bits, Solaris, and Windows 32 bit.

The “png” community module provides a PNG encoder which is pure java, thus available on any platform, striking a better balance between performance and size: the performance is, depending on the test, on par or superior to the native ImageIO one, and the output size is normally just a bit higher than the JDK one (and significantly smaller than the ImageIO based one, for the same compression level).

The “png” community module is based on the open source PNGJ library, a low level PNG decoding/encoding library, plus GeoServer specific optimized pixel extractors (ScanlineProviders) ensuring we do the least work possible when turning a RenderedImage into a PNG output.

The proposal is to merge this new encoder as the default one, on trunk, and change the PNG encoding chooser user interface, switching from a checkbox enabling the native encoder, to a three valued combo box providing the JDK, native and PNGJ, and change at the same time the data model to use an enumeration. On upgrade the native PNG encoder field will be cleared, and the PNGJ option will be set as the initial one, still leaving the admin the option to use the other two, if they so desire.

Feedback

This section should contain feedback provided by PSC members who may have a problem with the proposal.

Backwards Compatibility

The code should not present backwards compatibility issues, besides eventual issues in the PNG encoder code itself. The code will be setup so that if the encoding fails for any reason, one of the old encoders will take over.

Voting

Alessio Fabiani: +1 Andrea Aime: +1 Ben Caradoc Davies: +1 Christian Mueller: Gabriel Roldan: Jody Garnett: Jukka Rahkonen: +1 Justin Deoliveira: +1 Phil Scadden: +1 Simone Giannecchini: +1

Links

JIRA Task Email Discussion Wiki Page

Clone this wiki locally