Commit 6422b180 authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #4467 from dogmaphobic/sqlOptimization

Optimize SQL set creation.
parents d967a81a 2b6517c0
......@@ -454,6 +454,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
task->tileSet()->setId(setID);
//-- Prepare Download List
quint64 tileCount = 0;
_db->transaction();
for(int z = task->tileSet()->minZoom(); z <= task->tileSet()->maxZoom(); z++) {
QGCTileSet set = QGCMapEngine::getTileCount(z,
task->tileSet()->topleftLon(), task->tileSet()->topleftLat(),
......@@ -493,6 +494,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
}
}
}
_db->commit();
//-- Done
_updateSetTotals(task->tileSet());
task->setTileSetSaved();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment