[postgis-tickets] r17603 - ST_IsEmpty: Speed up by avoiding deserialization
Raul
raul at rmr.ninja
Mon Jul 15 03:13:24 PDT 2019
Author: algunenano
Date: 2019-07-15 03:13:23 -0700 (Mon, 15 Jul 2019)
New Revision: 17603
Modified:
trunk/NEWS
trunk/postgis/lwgeom_functions_basic.c
Log:
ST_IsEmpty: Speed up by avoiding deserialization
Closes #4453
Closes https://github.com/postgis/postgis/pull/442
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2019-07-15 10:08:13 UTC (rev 17602)
+++ trunk/NEWS 2019-07-15 10:13:23 UTC (rev 17603)
@@ -14,6 +14,7 @@
- #4449, Speed up ST_X, ST_Y, ST_Z and ST_M (Raúl Marín)
- #4456, add Rasbery Pi 32-bit jenkins bot for testing (Bruce Rindahl)
- #4454, Speed up _ST_OrderingEquals (Raúl Marín)
+ - #4453, Speed up ST_IsEmpty (Raúl Marín)
PostGIS 3.0.0alpha3
2019/07/01
Modified: trunk/postgis/lwgeom_functions_basic.c
===================================================================
--- trunk/postgis/lwgeom_functions_basic.c 2019-07-15 10:08:13 UTC (rev 17602)
+++ trunk/postgis/lwgeom_functions_basic.c 2019-07-15 10:13:23 UTC (rev 17603)
@@ -1797,12 +1797,7 @@
Datum LWGEOM_isempty(PG_FUNCTION_ARGS)
{
GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
- LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
- bool empty = lwgeom_is_empty(lwgeom);
-
- lwgeom_free(lwgeom);
- PG_FREE_IF_COPY(geom, 0);
- PG_RETURN_BOOL(empty);
+ PG_RETURN_BOOL(gserialized_is_empty(geom));
}
/**
More information about the postgis-tickets
mailing list