Skip to content

Commit 70f2208

Browse files
committed
Only run pending processing in append mode
1 parent 92d7fd5 commit 70f2208

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/osmdata.cpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -409,23 +409,14 @@ void osmdata_t::stop() const
409409
// should be the same for all outputs
410410
auto const *opts = m_outs[0]->get_options();
411411

412-
// are there any objects left pending?
413-
if (m_mid->has_pending()) {
414-
//threaded pending processing
412+
// In append mode there might be dependent objects pending that we
413+
// need to process.
414+
if (opts->append && m_mid->has_pending()) {
415415
pending_threaded_processor ptp(m_mid, m_outs, opts->num_procs,
416416
opts->append);
417417

418-
if (!m_outs.empty()) {
419-
//This stage takes ways which were processed earlier, but might be
420-
//involved in a multipolygon relation. They could also be ways that
421-
//were modified in diff processing.
422-
m_mid->iterate_ways(ptp);
423-
424-
//This is like pending ways, except there aren't pending relations
425-
//on import, only on update.
426-
//TODO: Can we skip this on import?
427-
m_mid->iterate_relations(ptp);
428-
}
418+
m_mid->iterate_ways(ptp);
419+
m_mid->iterate_relations(ptp);
429420
}
430421

431422
for (auto &out : m_outs) {

0 commit comments

Comments
 (0)