]> granicus.if.org Git - postgis/commitdiff
Increase size of internal PROJ cache
authorRaúl Marín Rodríguez <rmrodriguez@carto.com>
Wed, 19 Jun 2019 15:15:34 +0000 (15:15 +0000)
committerRaúl Marín Rodríguez <rmrodriguez@carto.com>
Wed, 19 Jun 2019 15:15:34 +0000 (15:15 +0000)
Creating PROJ projections is specially slow for PROJ6, so
we want to avoid recalculating them as much as possible

This is specially important for ST_Buffer(geography) since
it decides the SRID, and thus the projection, dinamically
based on the geometry position around the globe.

References #4372

git-svn-id: http://svn.osgeo.org/postgis/trunk@17542 b70326c6-7e19-0410-871a-916f4a2858ee

libpgcommon/lwgeom_cache.h
libpgcommon/lwgeom_transform.c

index b6ccc25a7ede56a84095224e3bf69048fbdb0999..034e494c5d33f005a717e940a41410a5334cb106 100644 (file)
@@ -73,7 +73,7 @@ typedef struct struct_PROJSRSCacheItem
 PROJSRSCacheItem;
 
 /* PROJ 4 lookup transaction cache methods */
-#define PROJ_CACHE_ITEMS       8
+#define PROJ_CACHE_ITEMS 128
 
 /*
 * The proj4 cache holds a fixed number of reprojection
index f5a612a1ea9cc72136f0a5e2cbb30145c53af2e1..c65d29d0bc6be7b9de21015da3463f51728de17a 100644 (file)
 */
 static char *spatialRefSysSchema = NULL;
 
-
 /*
  * PROJ 4 backend hash table initial hash size
  * (since 16 is the default portal hash table size, and we would
  * typically have 2 entries per portal
- * then we shall use a default size of 32)
+ * then we shall use a default size of 256)
  */
-#define PROJ_BACKEND_HASH_SIZE 32
-
+#define PROJ_BACKEND_HASH_SIZE 256
 
 /**
  * Backend PROJ hash table