diff --git a/CHANGELOG.md b/CHANGELOG.md index 9abda4a42..60e00f622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.34.1 + +* Further improvements to tile-join speed + # 2.34.0 * Improve speed of overzooming in tile-join diff --git a/tile-join.cpp b/tile-join.cpp index e4f46c008..93264d060 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -380,13 +380,14 @@ double max(double a, double b) { struct tilecmp { bool operator()(std::pair const &a, std::pair const &b) { // must match behavior of tileset_reader::operator<() + // except backwards, since we are pulling from the end of the list - if (a.first < b.first) { + if (b.first < a.first) { return true; } - if (a.first == b.first) { + if (b.first == a.first) { // Y sorts backwards, in TMS order - if (a.second > b.second) { + if (b.second > a.second) { return true; } } @@ -555,8 +556,8 @@ struct tileset_reader { return; } - auto xy = overzoomed_tiles.front(); - overzoomed_tiles.erase(overzoomed_tiles.begin()); + auto xy = overzoomed_tiles.back(); + overzoomed_tiles.erase(overzoomed_tiles.begin() + overzoomed_tiles.size() - 1); x = xy.first; y = xy.second; @@ -1061,7 +1062,7 @@ void decode(struct tileset_reader *readers, std::mapzoom != current.first.z || readers->x != current.first.x || readers->y != current.first.y) { - if (tasks.size() > 10 * CPUS) { + if (tasks.size() > 100 * CPUS) { dispatch_tasks(tasks, layermaps, outdb, outdir, header, mapping, exclude, include, ifmatched, keep_layers, remove_layers, filter, readers); tasks.clear(); } diff --git a/version.hpp b/version.hpp index 9a15330dc..e1c079731 100644 --- a/version.hpp +++ b/version.hpp @@ -1,6 +1,6 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define VERSION "v2.34.0" +#define VERSION "v2.34.1" #endif