Skip to content

Commit

Permalink
[mapserver] Implement responsive tile fetching and more efficient
Browse files Browse the repository at this point in the history
use of cache

Refactor tiled mapserver layers to use the same approach as is
done for WMTS/XYZ providers to avoid blocking renders while
multiple outgoing tile requests are in progress. Improves the
responsiveness of the provider and allows for much more efficient
use of cache.
  • Loading branch information
nyalldawson committed Jun 6, 2019
1 parent 4662bb9 commit a36787c
Show file tree
Hide file tree
Showing 7 changed files with 624 additions and 52 deletions.
2 changes: 2 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -318,6 +318,7 @@ SET(QGIS_CORE_SRCS
qgstessellator.cpp
qgstextlabelfeature.cpp
qgstextrenderer.cpp
qgstilecache.cpp
qgstolerance.cpp
qgstracer.cpp
qgstranslationcontext.cpp
Expand Down Expand Up @@ -975,6 +976,7 @@ SET(QGIS_CORE_HDRS
qgstextrenderer.h
qgstextrenderer_p.h
qgsthreadingutils.h
qgstilecache.h
qgstracer.h
qgstranslationcontext.h

Expand Down
File renamed without changes.
9 changes: 7 additions & 2 deletions src/providers/wms/qgstilecache.h → src/core/qgstilecache.h
Expand Up @@ -16,22 +16,27 @@
#ifndef QGSTILECACHE_H
#define QGSTILECACHE_H


#include "qgis_core.h"
#include <QCache>
#include <QMutex>

class QImage;
class QUrl;

#define SIP_NO_FILE

/**
* A simple tile cache implementation. Tiles are cached according to their URL.
* There is a small in-memory cache and a secondary caching in the local disk.
* The in-memory cache is there to save CPU time otherwise wasted to read and
* uncompress data saved on the disk.
*
* The class is thread safe (its methods can be called from any thread).
*
* \note Not available in Python bindings
* \since QGIS 3.8.0
*/
class QgsTileCache
class CORE_EXPORT QgsTileCache
{
public:

Expand Down

0 comments on commit a36787c

Please sign in to comment.