mapnik/mapnik — pull request #2514 by talaj (2014-10-08 21:55:37+00:00)
Title: exponential tolerance_iterator

This is proposal for `tolerance_iterator` with exponential back off.

Gives following figures for the same test as in https://github.com/mapnik/mapnik/issues/2384#issuecomment-58366685.

90868 iterations instead of 221558 for linear back off.

```
text rendering: t:0 i:20 14520 milliseconds
```
```
20.47% test_rendering libmapnik.so [.] mapnik::image_32::composite_pixel(unsigned int, int, int, unsigned int, unsigned int, double)
16.34% test_rendering libfreetype.so.6.8.1 [.] 0x5dd02
7.76% test_rendering libmapnik.so [.] agg::comp_op_rgba_src_over::blend_pix(unsigned char*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)
7.55% test_rendering libc-2.13.so [.] 0x135950
5.03% test_rendering libmapnik.so [.] mapnik::agg_text_renderer::render_halo(FT_Bitmap_*, unsigned int, int, int, double, double, mapnik::composite_mode_e)
4.02% test_rendering libmapnik.so [.] mapnik::agg_renderer::end_map_processing(mapnik::Map const&)
3.98% test_rendering libmapnik.so [.] mapnik::image_32::set_background(mapnik::color const&)
3.72% test_rendering [kernel.kallsyms] [k] clear_page_c_e
2.65% test_rendering libfreetype.so.6.8.1 [.] FT_MulFix
1.98% test_rendering [kernel.kallsyms] [k] page_fault
1.60% test_rendering libharfbuzz.so.0.935.0 [.] OT::AnchorMatrix::sanitize(OT::hb_sanitize_context_t*, unsigned int)
1.15% test_rendering libm-2.13.so [.] 0xdeeb
1.13% test_rendering libmapnik.so [.] mapnik::box2d::intersects(mapnik::box2d const&) const
1.06% test_rendering [kernel.kallsyms] [k] do_raw_spin_lock
0.98% test_rendering libmapnik.so [.] mapnik::placement_finder::collision(mapnik::box2d const&, icu_48::UnicodeString const&, bool) const
0.98% test_rendering libmapnik.so [.] mapnik::placement_finder::single_line_placement(mapnik::vertex_cache&, mapnik::enumeration)
0.90% test_rendering libfreetype.so.6.8.1 [.] FT_Vector_Transform
0.76% test_rendering libmapnik.so [.] mapnik::agg_text_renderer::render(mapnik::glyph_positions const&)
0.63% test_rendering libfreetype.so.6.8.1 [.] FT_Outline_Decompose
0.61% test_rendering libharfbuzz.so.0.935.0 [.] _hb_ot_layout_create(hb_face_t*)
0.49% test_rendering libm-2.13.so [.] sincos
0.49% test_rendering libc-2.13.so [.] malloc
0.47% test_rendering libfreetype.so.6.8.1 [.] FT_Outline_Translate
0.42% test_rendering libmapnik.so [.] mapnik::quad_tree::query_node(mapnik::box2d const&, boost::ptr_vector >&, mapnik::quad_tree::node*) const
0.36% test_rendering libfreetype.so.6.8.1 [.] FT_Outline_Get_CBox
0.35% test_rendering libc-2.13.so [.] free
0.32% test_rendering libmapnik.so [.] mapnik::quad_tree::do_insert_data(mapnik::label_collision_detector4::label, mapnik::box2d const&, mapnik::quad_tree::node*, unsigned int&)
0.27% test_rendering libfreetype.so.6.8.1 [.] ft_mem_qrealloc
0.27% test_rendering libharfbuzz.so.0.935.0 [.] OT::ArrayOf >::sanitize(OT::hb_sanitize_context_t*, void*)

```