Skip to content
Permalink
Browse files

[gdal] Enable multi-threaded whenever possible

(benefits including faster overviews building, warping, and
more)
  • Loading branch information
nirvn committed Feb 21, 2021
1 parent eb6bac2 commit b306ae0411fc98770d3966c5d2404ea29981b1ba
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/qgsapplication.cpp
@@ -347,6 +347,13 @@ void QgsApplication::init( QString profileFolder )
}
*sSystemEnvVars() = systemEnvVarMap;

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,2,0)
if ( CPLGetConfigOption( "GDAL_NUM_THREADS", nullptr ) == nullptr )
{
CPLSetConfigOption( "GDAL_NUM_THREADS", "ALL_CPUS" );
}
#endif

#if PROJ_VERSION_MAJOR>=6
// append local user-writable folder as a proj search path
QStringList currentProjSearchPaths = QgsProjUtils::searchPaths();

0 comments on commit b306ae0

Please sign in to comment.