Significantly speeds up creation of large collection of geometries.
Closes #2933
git-svn-id: http://svn.osgeo.org/postgis/trunk@12993
b70326c6-7e19-0410-871a-
916f4a2858ee
/* Allocate more space if we need it */
lwcollection_reserve(col, col->ngeoms + 1);
+#if PARANOIA_LEVEL > 1
+ /* See http://trac.osgeo.org/postgis/ticket/2933 */
/* Make sure we don't already have a reference to this geom */
- /* TODO: drop this check ... */
for ( i = 0; i < col->ngeoms; i++ )
{
if ( col->geoms[i] == geom )
return col;
}
}
+#endif
col->geoms[col->ngeoms] = (LWGEOM*)geom;
col->ngeoms++;