Speed up overzooming in tile-join (#147)

* Clip away entire features by bbox. Avoid unnecessary recompression.

* Move parent tile decoding in tile-join out of overzoom proper

* An ever-growing cache of parent tiles

* Limit the size of the cache

* Remove the current reader *before* checking if we can run the queue

* Clean up

* Add missing #include

* Add comment

* When the tile-join cache fills up, evict the least recently used

* Fix microsecond math

* Factoring out tile-join's cache for testing

* Add unit tests for tile-join cache

* Update changelog and version
This commit is contained in:
Erica Fischer
2023-10-04 12:14:22 -07:00
committed by GitHub
parent 26bf08deb2
commit cc5c1c79df
11 changed files with 260 additions and 112 deletions
+5 -1
View File
@@ -7,6 +7,7 @@
#include <string>
#include <sqlite3.h>
#include <stdio.h>
#include <mvt.hpp>
#define VT_POINT 1
#define VT_LINE 2
@@ -97,7 +98,10 @@ void visvalingam(drawvec &ls, size_t start, size_t end, double threshold, size_t
int pnpoly(const drawvec &vert, size_t start, size_t nvert, long long testx, long long testy);
double distance_from_line(long long point_x, long long point_y, long long segA_x, long long segA_y, long long segB_x, long long segB_y);
std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int ny,
int detail, int buffer, std::set<std::string> const &keep, bool do_compress);
std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int ny,
int detail, int buffer, std::set<std::string> const &keep);
int detail, int buffer, std::set<std::string> const &keep, bool do_compress);
#endif