Skip to content

Commit

Permalink
work around perf issue with logging in wkb.cpp - refs #1175
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Apr 12, 2012
1 parent c33fdfd commit 44d7a38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wkb.cpp
Expand Up @@ -113,8 +113,9 @@ struct wkb_reader : boost::noncopyable
{ {
int type = read_integer(); int type = read_integer();


#ifdef MAPNIK_LOG
MAPNIK_LOG_DEBUG(wkb_reader) << "wkb_reader: Read=" << wkb_geometry_type_string(type) << "," << type; MAPNIK_LOG_DEBUG(wkb_reader) << "wkb_reader: Read=" << wkb_geometry_type_string(type) << "," << type;

#endif
switch (type) switch (type)
{ {
case wkbPoint: case wkbPoint:
Expand Down Expand Up @@ -401,6 +402,7 @@ struct wkb_reader : boost::noncopyable
} }
} }


#ifdef MAPNIK_LOG
std::string wkb_geometry_type_string(int type) std::string wkb_geometry_type_string(int type)
{ {
std::stringstream s; std::stringstream s;
Expand All @@ -426,6 +428,7 @@ struct wkb_reader : boost::noncopyable


return s.str(); return s.str();
} }
#endif
}; };


void geometry_utils::from_wkb (boost::ptr_vector<geometry_type>& paths, void geometry_utils::from_wkb (boost::ptr_vector<geometry_type>& paths,
Expand Down

0 comments on commit 44d7a38

Please sign in to comment.