1.. _rfc-25: 2 3================================================================================ 4RFC 25: Fast Open (withdrawn) 5================================================================================ 6 7Authors: Frank Warmerdam 8 9Contact: warmerdam@pobox.com 10 11Status: Withdrawn (in favor of some specific improvements in #2957 - rfc 12may be renewed at a later date) 13 14Summary 15------- 16 17This document proposes a mechanism for application to indicate a desire 18for the fastest possible open of a raster file, even if a variety of 19metadata and supporting information may not be available. It is 20primarily intended to optimize applications working with catalogs 21containing many raster files. 22 23Implementation 24-------------- 25 26An application can request fast open mode by setting the 27"GDAL_FAST_OPEN" configuration option to "YES" - the default is assumed 28to be no. When this option is set to YES selected drivers can operate 29differently so as to optimize the speed of opening a dataset. 30Acceleration options include: 31 32- Skip establishing a coordinate system - particularly helpful if it 33 avoids an EPSG lookup. 34- Skip probing for supporting .aux.xml, world files and other files. 35 36It is anticipated that fast open mode will be used primarily for fast 37raster display from datasets where required metadata is already provided 38by a catalog of some sort. Because of this it is essential that in fast 39open mode datasets will still accurately return a list of bands, their 40datatypes, and their overviews. 41 42Thread Local Configuration Options 43---------------------------------- 44 45In multi-threaded applications use of a process-global configuration 46option - turned on just while calling GDALOpen() - may not be 47appropriate. In particular, it is hard to ensure that this configuration 48option won't affect GDALOpen()'s in other threads of the same process. 49This problem also affects other configuration options that. To resolve 50this problem it is intended to add a new function to set "thread local" 51configuration options. 52 53:: 54 55 void CPLSetThreadLocalConfigOption( const char *pszKey, const char *pszValue ); 56 57This mechanism will be implemented using normal thread local data 58handling (CPLGetTLS(), etc). 59 60It should be noted that CPLSetConfigOption() will continue to set 61configuration options to apply to all threads. CPLGetConfigOption() will 62first search thread local values, then process global values and then 63the environment. 64 65Work Plan 66--------- 67 68For the time being the following changes will be made to drivers to 69accelerate them in fast open mode. 70 71- GDALOpenInfo will avoid loading a list of all files in a directory. 72- GTIFF driver will avoid collecting a coordinate systems. 73 74This work will be completed in trunk in time for the GDAL 1.7.0 release 75by Frank Warmerdam. 76 77Utilization 78----------- 79 80There is no plan to do this immediately, but the GDAL VRT driver would 81be a good candidate to utilize this mechanism. 82 83In theory, it would also be desirable for MapServer to utilize this mode 84for tileindexed rasters - except that MapServer depends on the 85geotransform coming from the underlying raster file rather than coming 86from the raster catalog. MapServer also assumes the color table, and 87nodata values will be available. 88 89ArcGIS is also expected to utilize this feature. 90 91Backward Compatibility Issues 92----------------------------- 93 94There are no known backward compatibility issues. However, there may be 95forward compatibility issues if we are not precise and consistent from 96version to version on what supporting info is allowed to be omitted in 97fast open mode. 98 99Testing 100------- 101 102- Tests would be added to the appropriate driver test scripts to test 103 fast open mode - confirming that expected information is discarded, 104 and kept. 105 106Issues 107------ 108 109- Potentially desirable things like ignoring .aux.xml files are not 110 possible as they are also sometimes the source of overview 111 information. 112- Potentially discarding all metadata including color tables, nodata 113 values, and geotransforms makes this mode not useful for applications 114 like MapServer that don't keep such information in their catalog. 115- This RFC does not discuss a way of accelerating GDALOpen() by 116 skipping unnecessary drivers, though that would also potentially help 117 quite a bit. 118