[GRASS-SVN] r61458 - grass/branches/releasebranch_7_0/raster/r.in.gdal

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 30 07:06:09 PDT 2014


Author: neteler
Date: 2014-07-30 07:06:09 -0700 (Wed, 30 Jul 2014)
New Revision: 61458

Modified:
   grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c
Log:
r.in.gdal: predefine 300 MiB as default cache size for speed-up; msg cosmetics (trunk, r61362 + r61364)

Modified: grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c	2014-07-30 13:46:53 UTC (rev 61457)
+++ grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c	2014-07-30 14:06:09 UTC (rev 61458)
@@ -102,6 +102,7 @@
     parm.memory->type = TYPE_INTEGER;
     parm.memory->required = NO;
     parm.memory->options = "0-2047";
+    parm.memory->answer = "300";
     parm.memory->description = _("Cache size (MiB)");
 
     parm.target = G_define_option();
@@ -209,11 +210,9 @@
     if (parm.memory->answer && *parm.memory->answer) {
 	   /* TODO: GDALGetCacheMax() overflows at 2GiB, implement use of GDALSetCacheMax64() */
            GDALSetCacheMax(atol(parm.memory->answer) * 1024 * 1024);
-           G_verbose_message(_("Using user memory cache size: %.1f MiB"), GDALGetCacheMax()/1024.0/1024.0);
-    } else
-        G_verbose_message(_("Using default GDAL memory cache size: %.1f MiB"), GDALGetCacheMax()/1024.0/1024.0);
+           G_verbose_message(_("Using memory cache size: %.1f MiB"), GDALGetCacheMax()/1024.0/1024.0);
+    }
 
-
     /* -------------------------------------------------------------------- */
     /*      List supported formats and exit.                                */
     /*         code from GDAL 1.2.5  gcore/gdal_misc.cpp                    */



More information about the grass-commit mailing list