Skip to content

Commit

Permalink
[gdal] Enable multi-threaded whenever possible
Browse files Browse the repository at this point in the history
(benefits including faster overviews building, warping, and
more)
  • Loading branch information
nirvn committed Feb 21, 2021
1 parent eb6bac2 commit b306ae0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/qgsapplication.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit b306ae0

Please sign in to comment.