From 1f792e6b9c9b41c4da8f8996e3eb325e444b0099 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 4 Apr 2020 12:24:12 +0200 Subject: hgridshift/vgridshift: defer grid opening when grid has already been opened Relates to #2115 With the fix of https://github.com/OSGeo/PROJ/pull/2128, transforming between EPSG:4326+3855 and EPSG:4269+5703 leads to many operations with many grids, and opening a file handle for each operation saturates the limit of 1024 file handles opened simunalteously. This fix defers grid opening when a transformation has already been instanciated with the same grid. --- src/malloc.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/malloc.cpp') diff --git a/src/malloc.cpp b/src/malloc.cpp index 9ac28546..10ab2fad 100644 --- a/src/malloc.cpp +++ b/src/malloc.cpp @@ -264,4 +264,6 @@ void proj_cleanup() { pj_clear_initcache(); pj_deallocate_grids(); FileManager::clearMemoryCache(); + pj_clear_hgridshift_knowngrids_cache(); + pj_clear_vgridshift_knowngrids_cache(); } -- cgit v1.2.3