Skip to content

Commit

Permalink
remove debug counters
Browse files Browse the repository at this point in the history
  • Loading branch information
cldellow committed Oct 1, 2024
1 parent fa42b2e commit 90b1d86
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/osm_lua_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ thread_local OsmLuaProcessing* osmLuaProcessing = nullptr;

std::mutex vectorLayerMetadataMutex;

std::atomic<uint64_t> bitmapLookups;
std::atomic<uint64_t> bitmapHits;

void handleOsmLuaProcessingUserSignal(int signum) {
osmLuaProcessing->handleUserSignal(signum);
}
Expand Down Expand Up @@ -358,13 +355,7 @@ double OsmLuaProcessing::AreaIntersecting(const string &layerName) {
template <typename GeometryT>
std::vector<uint> OsmLuaProcessing::intersectsQuery(const string &layerName, bool once, GeometryT &geom) const {
Box box; geom::envelope(geom, box);
bitmapLookups++;

if (bitmapLookups.load() % 10000 == 0) {
std::cout << "lookup: " << std::to_string(bitmapHits) << " saved calls of " << std::to_string(bitmapLookups) << " lookups" << std::endl;
}
if (!shpMemTiles.mayIntersect(layerName, box)) {
bitmapHits++;
return std::vector<uint>();
}

Expand Down
4 changes: 0 additions & 4 deletions src/shp_mem_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ void ShpMemTiles::StoreGeometry(
uint32_t y1 = latp2tiley(latp1, spatialIndexZoom);
uint32_t y2 = latp2tiley(latp2, spatialIndexZoom);

uint32_t hits = 0;
for (int x = std::min(x1, x2); x <= std::min((1u << spatialIndexZoom) - 1u, std::max(x1, x2)); x++) {
for (int y = std::min(y1, y2); y <= std::min((1u << spatialIndexZoom) - 1u, std::max(y1, y2)); y++) {
uint32_t z6x = x / (1u << (spatialIndexZoom - CLUSTER_ZOOM));
Expand All @@ -223,9 +222,6 @@ void ShpMemTiles::StoreGeometry(

uint32_t divisor = 1u << (spatialIndexZoom - CLUSTER_ZOOM);
uint64_t index = 2u * ((x - z6x * divisor) * divisor + (y - z6y * divisor));
if (!bitvec[index]) {
hits++;
}
bitvec[index] = true;
}
}
Expand Down

0 comments on commit 90b1d86

Please sign in to comment.