Cache Mechanism for 3D Service |
In order to improve the overall performance of 3D data applications, it is necessary to preprocess the data before use, that is, to create a hierarchical cache. For example, the image data is preprocessed, that is, the image data is simplified into a set of images with different resolutions, a series of layers with different resolutions are established through a resampling method, each layer is stored separately, and a corresponding spatial indexing mechanism is established, so that the display efficiency when the image is zoomed and browsed is improved. Therefore, it is recommended to use 3D cache data instead of raw data for the data loaded in the 3D scene.
For the 3D service of SuperMap iServer, the amount of data transmitted from the server to the client is larger when browsing the 3D scene, so the cache mechanism is also needed to improve the efficiency of client access.
SuperMap iServer's 3D service supports common cache mechanisms provided on the server side, such as HTTP Cache , Request Cache , and support for its unique 3D cache, including dynamic cache and manual pre-cache.
SuperMap iServer provides dynamic cache to speed up user browsing and access to 3D scenes.
After 3D service publishing, when the user accesses the service and browses the data for the first time, the server will dynamically generate the 3D cache of the corresponding layer, and the user does not need to generate the cache again for the next request. That is to say, except that the server side needs to generate the cache while loading the data when the user accesses the 3D service for the first time, the server side directly calls the cache data cached at the client side when the user accesses the 3D service again, thereby improving the response speed of the server side when the user accesses the 3D service.
The 3D service of SuperMap iServer enables dynamic cache by default, and there is no need to set it manually. For the cache type and format automatically generated by SuperMap 3D service, please refer to: Storage Format .
Pre-cache of 3D service refers to putting the pre-generated cache file or the cache of the entire scene into the cache directory corresponding to SuperMap iServer, that is, copying the cache file to 【SuperMap iServer installation directory】\webapps\iserver\output\{scene}.
After the pre-tile cache file is stored in the above cache directory, the client will directly use the cache data when browsing the scene of the 3D service, instead of generating a dynamic cache. About for the pre-cache data type and file format supported by SuperMap 3D service, please refer to: Storage Format . When using the pre-cache function of 3D service, please pay attention to keeping the consistency of path and cache name. The benefit of using the entire 3D scene cache is that all data in the scene can be cached by one operation in SuperMap iDesktop, and it is easier to ensure the consistency of the file name and directory of each data cache when the cache of the entire scene is saved to the 3D service cache path. Therefore, it is recommended to use this pre-cache method for the entire scene.
Note :
SuperMap iServer 3D service supports the following cache formats: image cache, terrain cache, vector cache, vector model cache, 2D/3D map cache, and cache for the entire 3D scene.
Cache Type |
Cache Format |
Explain |
Vector | *.scv | Cache name: dataset name@datasource name |
Image | *.sci3d | Cache name: dataset name@datasource name_MIX |
Terrain | *.sct | Cache name: dataset name@datasource name_Terrain_ZIP |
Model | *.scm, *.scv, *.scp | |
Map | *.sci (map cache) | Cache name: map name |
Scene cache | Cache name: 3D scene name The scene cache is a set of files, that is, each type of data above is created into a corresponding 3D cache. |
Original – When the cache storage type is original, that is, StorageType.Original , the cache file is original format, and the cache data is represented as formats under multiple folders. For terrain cache, the cache file is *bil format, image cache is *. png format.
Compact – When the cache storage type is StorageType.Compact, the cache file is in the large file cache format, and the cache data is in the compact file format. The cache file is not the original cache picture, but all the cache pictures in the column folder are compacted and encrypted, and stored in a group of files. The set of files is divided into three parts: an index file, a set of data files, and a lock file. The index file is *.sc (SuperMap Cache File) format; the data file is in *.scXX (SuperMap Cache File Data) format, where XX is not two letters but two hexadecimal numbers (00 ~ FF). Only two hexadecimal digits are supported here, so up to 256 data files are supported. The number of data files is determined by the size of the cache data, and the maximum size of one data file is 2G. In addition, there may be a lock file (in *.~format) under Windows that enables multi-threaded or multi process simultaneous read and write caching. Compared to the original model, the compact storage method has the following advantages:
(1) Transmission and copying of a large number of cache files are facilitated;
(2) Shortening the time consumption of cache creation;
(3) Improving that acquisition performance of the client cache file;
(4) Data supports encryption.