grass icon indicating copy to clipboard operation
grass copied to clipboard

[Feat] add support for libdeflate in configure

Open neteler opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe.

libdeflate is reported to be about 2-4x faster than zlib (Fedora changes GDAL compilation from zlib to libdeflate, see request on bugzilla).

Describe the solution you'd like Add support for libdeflate as optional alternative to configure.

This might speed up esp. raster data processing.

Needed changes As far as I understand the current configure content, some extra lines would be needed in configure.ac.

Probably more changes are needed to update also

  • https://grass.osgeo.org/grass-stable/manuals/r.compress.html#overview-of-available-compression-algorithms
  • and related.

For an initial benchmarking, the configure.ac changes might be enough.

neteler avatar Jan 30 '24 22:01 neteler

Slightly interesting if there is a real demand for it. Does it mean that it would be considered like a new compression format, or just another library for an existing format? How can it be tested if we want to officially support?

echoix avatar Jan 30 '24 23:01 echoix

From what I understand it is another library for an existing format. Hence a potential performance improvement.

neteler avatar Jan 30 '24 23:01 neteler

As far as I understand libdeflate is not a "replacement" to zlib, meaning this is not only a question of configuration. See example from GDAL : https://github.com/OSGeo/gdal/commit/01b3560c90b3a7ae005dd67c69eae85262adcec3

nilason avatar Jan 31 '24 13:01 nilason

As far as I understand libdeflate is not a "replacement" to zlib, meaning this is not only a question of configuration. See example from GDAL : OSGeo/gdal@01b3560

Yes, support for libdeflate needs to be added to https://github.com/OSGeo/grass/blob/main/lib/gis/cmprzlib.c with e.g. some #if HAVE_LIBDEFLATE ... #else ... #endif and libgis needs to be linked against libdeflate.

metzm avatar Jan 31 '24 16:01 metzm