forked from organicmaps/organicmaps
Reorder element processing operation for up performance
This commit is contained in:
parent
61e7bc71c0
commit
ae2ba105a1
1 changed files with 13 additions and 4 deletions
|
@ -405,12 +405,13 @@ public:
|
|||
/// The main entry point for parsing process.
|
||||
void EmitElement(XMLElement * p)
|
||||
{
|
||||
FeatureParams params;
|
||||
if (!ParseType(p, params))
|
||||
return;
|
||||
|
||||
if (p->type == XMLElement::EntityType::Node)
|
||||
{
|
||||
|
||||
FeatureParams params;
|
||||
if (!ParseType(p, params))
|
||||
return;
|
||||
|
||||
m2::PointD pt;
|
||||
if (p->childs.empty() || !GetPoint(p->id, pt))
|
||||
return;
|
||||
|
@ -437,6 +438,10 @@ public:
|
|||
if (ft.GetPointsCount() < 2)
|
||||
return;
|
||||
|
||||
FeatureParams params;
|
||||
if (!ParseType(p, params))
|
||||
return;
|
||||
|
||||
ft.SetOsmId(osm::Id::Way(p->id));
|
||||
bool isCoastLine = (m_coastType != 0 && params.IsTypeExist(m_coastType));
|
||||
|
||||
|
@ -469,6 +474,10 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
FeatureParams params;
|
||||
if (!ParseType(p, params))
|
||||
return;
|
||||
|
||||
holes_accumulator holes(this);
|
||||
AreaWayMerger<THolder> outer(m_holder);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue