Reorder element processing operation for up performance

This commit is contained in:
Sergey Yershov 2015-08-12 15:06:50 +03:00 committed by Alex Zolotarev
parent 61e7bc71c0
commit ae2ba105a1

View file

@ -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);