some quick profiling: karte_ansicht_t::display needs 0.016 s (clipping pathc) and 0.013 (trunk), which means a small performance loss.
trunk:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
50.61 7.82 7.82 726481 0.00 0.00 display_img_nc(short, short, short, unsigned short const*)
4.53 8.52 0.70 3295327 0.00 0.00 pixcopy(unsigned short*, unsigned short const*, unsigned int)
2.01 8.83 0.31 49461 0.00 0.00 display_img_wc(short, short, short, unsigned short const*)
1.78 9.11 0.28 14008 0.00 0.00 karte_t::sync_step(long, bool, bool)
1.75 9.38 0.27 47806470 0.00 0.00 decode_uint16(char*&)
1.68 9.63 0.26 47880223 0.00 0.00 endian_uint16(unsigned short const*)
1.10 9.80 0.17 20632 0.00 0.00 image_reader_t::read_node(_IO_FILE*, obj_node_info_t&)
1.10 9.97 0.17 14307 0.00 0.00 register_image(bild_t*)
1.04 10.13 0.16 6095874 0.00 0.00 vehikel_basis_t::fahre_basis(unsigned int)
1.04 10.29 0.16 730 0.00 0.01 karte_ansicht_t::display(bool)
clipping patch:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
40.44 7.04 7.04 730804 0.00 0.00 display_img_nc(short, short, short, unsigned short const*)
11.75 9.09 2.04 12947024 0.00 0.00 pixcopy(unsigned short*, unsigned short const*, unsigned int)
4.65 9.89 0.81 167260 0.00 0.00 display_img_pc(short, short, short, unsigned short const*)
2.07 10.26 0.36 8792448 0.00 0.00 get_xrange_and_step_y(int&, int&)
1.95 10.60 0.34 9291401 0.00 0.00 clip_line_t::inc_y(xrange&) const
1.72 10.89 0.30 50420 0.00 0.00 display_img_wc(short, short, short, unsigned short const*)
1.55 11.16 0.27 803 0.00 0.02 karte_ansicht_t::display(bool)
1.38 11.40 0.24 47806472 0.00 0.00 decode_uint16(char*&)
1.32 11.63 0.23 14081 0.00 0.00 karte_t::sync_step(long, bool, bool)
1.09 11.82 0.19 6081706 0.00 0.00 vehikel_basis_t::fahre_basis(unsigned int)
1.09 12.02 0.19 1971601 0.00 0.00 display_img_aux(unsigned int, short, short, signed char, int, int)
profiling results are here: http://simutrans-germany.com/files/upload/prof-results.zip
profiled with: -objects pak128.Britain/ -screensize 1920x1200 -fullscreen -load test -until 23309
savegame here: http://simutrans-germany.com/files/upload/test.sve