News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Citycars and performance?

Started by jamespetts, April 10, 2012, 12:59:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I have been attempting to track down why performance on the server game has fallen off so badly: the issue relates, I think, to city cars (that is, the graphical representation of them in game rather than the journey time simulations discussed here, which is turned off by virtue of the "assume_everywhere_connected_by_road=1" setting).

On a downloaded version of the server game, I ran 10.11 for a month unchanged, and another copy of 10.11 for a month with traffic density set to zero (which will clear the cars from the streets at the next month boundary). After the month boundary passed, the performance in the version with the city cars was much slower than in the version without the city cars: the frame time was hovering around 255ms in the version with the city cars, and the framerate between 2-3 fps. In the version without city cars, the frame time is closer to 30ms and the framerate holding steady at 30ms. Running 10.10 with the city cars yields the same result.

The difference in performance between the server running 10.10 and 10.11, therefore, is not something inherent to 10.11, but the fact that assume_everywhere_connected_by_road is set, which in turn causes more private car trips, which, further, causes there to be more city car graphics, which affects the performance substantially. As a short term solution, I shall greatly reduce the traffic density setting, which should restore performance to an acceptable level for the time being.

In the meantime, I should be interested to have some ideas (perhaps from Standard developers) as to why city cars have such a large hit on performance. It cannot be memory consumption per se, as the memory consumption was actually lower in the version with the city cars enabled than in the one without (both 10.11). The CPU usage in Task Manager shows a higher CPU utilisation generally with the city cars than without, but still short of the full 25% (I have a quad core system, and Simutrans is single-threaded, so 25% would be full use of one core). CPU utilisation is usually 15-20% both for the version with the cars and without the cars. Is it, perhaps, memory bandwidth? How would I go about checking that?

I should be very interested in any ideas about how to reduce the impact of city cars on performance, a first step towards which would be identifying which part of the city car related code takes the most in the way of system resources. I should very much like, if possible, to have realistic levels of city cars in the game, as the ability realistically to simulate traffic congestion would be a very worthwhile game feature to have.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

kierongreen

ist_weg_frei is often the cause of performance issues with vehicles. Much of the time simutrans uses only about 70% of CPU (100% = one core i.e. equivalent to your 15-20% figure) on my system when running in one thread, even in busy games. I think this is mostly down to memory bandwidth as you suggest, but this is a general issue not just to do with city cars so you shouldn't necessarily expect 90% CPU usage.

dustNbone

Has the servers' savegame been changed with the lower traffic setting? I would like to get a local copy to experiment with, as it's sort of a known performance benchmark for me at this point.  Thanks for all your work on this James, it seems like very demanding work.

jamespetts

Kieron,

thank you. What part of ist_weg_frei consumes all the memory bandwidth, do you know? I wonder whether disabling DESTINATION_CITYCARS would make a difference.

dustNbone,

I have not yet restarted the server with the lower setting - I shall do that hopefully in the next few days when I get a chance. When I do, I shall post on the server's thread.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

kierongreen

QuoteI wonder whether disabling DESTINATION_CITYCARS would make a difference.
It's not just bandwidth it's CPU too. That is in general you shouldn't expect simutrans to be able to use 100% CPU as there are memory bandwidth problems elsewhere which often limit it to 70% max. ist_weg_frei uses a lot of whatever CPU time is available however. So simplifying this by removing destinations I suspect would make a significant difference - certainly worth a try!

prissi

#5
I really really really suggest to download mingw32, set PROFILING=2 in the config.default. Then you just run the game under fast forward for a month using the until switch on the command line with always the same developed savegame. This generates a file "gmon.out". Copy this into the trunk folder (where the config.default is) run "gprof sim.exe >profilingfile.txt" and you get a detailed profile on how many percentage is spend in which routine like below. Anything else is guesswork.

Here is the current state of standard for a month with the yoshi testgame with r5624. According to this "ist_weg_frei" does not consume any relevant CPU time, only 0.15%. Most effort goes on routing stuff around (all the haltestelle_t calls). This part goes of course down, the longer the game runs without the need to reroute.

For longer time, convoi::sync_step and convoi::step became more important.


Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
time   seconds   seconds    calls   s/call   s/call  name   
  9.01     17.85    17.85    19331     0.00     0.00  karte_t::sync_step(long, bool, bool)
  3.96     25.70     7.85 62955779     0.00     0.00  haltestelle_t::is_transfer(unsigned char) const
  3.96     33.54     7.84 230806646     0.00     0.00  ding_t::get_flag(ding_t::flag_values) const
  3.75     40.98     7.43                             display_img_nc(short, short, short, unsigned short const*)
  3.20     47.31     6.34 41385701     0.00     0.00  convoi_t::sync_step(long)
  3.17     53.60     6.29   587165     0.00     0.00  haltestelle_t::search_route(quickstone_tpl<haltestelle_t> const*, unsigned short, bool, ware_t&, ware_t*)
  2.86     59.28     5.67 41382194     0.00     0.00  convoi_t::step()
  2.77     64.76     5.48   166932     0.00     0.00  haltestelle_t::search_route_resumable(ware_t&)
  1.78     68.28     3.52 510318197     0.00     0.00  quickstone_tpl<haltestelle_t>::is_bound() const
  1.72     71.68     3.40 206026644     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  1.53     74.71     3.03 94085229     0.00     0.00  planquadrat_t::get_boden_in_hoehe(short) const
  1.52     77.72     3.01 124343257     0.00     0.00  grund_t::get_hoehe() const
  1.50     80.70     2.98 28314192     0.00     0.00  convoi_t::calc_acceleration(long)
  1.34     83.36     2.66 254891741     0.00     0.00  koord::koord(short, short)
  1.20     85.74     2.38   721410     0.00     0.00  haltestelle_t::hole_ab(slist_tpl<ware_t>&, ware_besch_t const*, unsigned int, schedule_t const*, spieler_t const*)
  1.16     88.04     2.30  9680832     0.00     0.00  fabrik_t::step(long)
  1.14     90.30     2.26 122708908     0.00     0.00  karte_t::ist_in_kartengrenzen(short, short) const
  1.14     92.56     2.26                             pixcopy(unsigned short*, unsigned short const*, unsigned short const*)
  1.13     94.80     2.24    15728     0.00     0.00  karte_t::sync_way_eyecandy_step(long)
  1.03     96.84     2.04 64005986     0.00     0.00  grund_t::get_weg(waytype_t) const
  1.02     98.86     2.02 188039500     0.00     0.00  koord3d::get_2d() const
  0.98    100.80     1.94 185107482     0.00     0.00  vector_tpl<sync_steppable*>::append(sync_steppable* const&)
  0.98    102.74     1.94  7926556     0.00     0.00  binary_heap_tpl<route_t::ANode*>::pop()
  0.94    104.61     1.87 12919723     0.00     0.00  binary_heap_tpl<haltestelle_t::route_node_t>::pop()
  0.90    106.40     1.79 422404766     0.00     0.00  quickstone_tpl<haltestelle_t>::get_id() const
  0.88    108.14     1.74 63193577     0.00     0.00  dingliste_t::bei(unsigned char) const
  0.87    109.86     1.72 137704247     0.00     0.00  quickstone_tpl<haltestelle_t>::operator==(quickstone_tpl<haltestelle_t> const&) const
  0.85    111.55     1.69 122639904     0.00     0.00  karte_t::lookup(koord) const
  0.84    113.21     1.66   101510     0.00     0.00  route_t::intern_calc_route(karte_t*, koord3d, koord3d, fahrer_t*, int, unsigned int)
  0.83    114.86     1.65    15728     0.00     0.00  karte_t::sync_eyecandy_step(long)
  0.75    116.34     1.49 52270133     0.00     0.00  ding_t::is_moving() const
  0.68    117.69     1.35 31389793     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, unsigned char) const
  0.63    118.95     1.25  9234764     0.00     0.00  dingliste_t::remove(ding_t const*)
  0.62    120.18     1.23 350203998     0.00     0.00  haltestelle_t::route_node_t::operator*() const
  0.62    121.41     1.23  6382677     0.00     0.00  vehikel_t::hop()
  0.61    122.61     1.20                             __divdi3
  0.56    123.72     1.11  8259553     0.00     0.00  dingliste_t::intern_add_moving(ding_t*)
  0.55    124.81     1.09  8693736     0.00     0.00  fabrik_t::book_weighted_sums(long long)
  0.55    125.89     1.08 125515547     0.00     0.00  route_t::ANode::operator<=(route_t::ANode) const
  0.49    126.86     0.97 34178788     0.00     0.00  quickstone_tpl<simline_t>::is_bound() const
  0.47    127.80     0.94                             display_img_wc(short, short, short, unsigned short const*)
  0.46    128.70     0.91                             void display_img_pc<(pixcopy_routines)0>(short, short, short, unsigned short const*)
  0.45    129.59     0.89 23609301     0.00     0.00  binary_heap_tpl<haltestelle_t::route_node_t>::insert(haltestelle_t::route_node_t)
  0.45    130.48     0.89                             inflate
  0.43    131.34     0.86 150031471     0.00     0.00  vector_tpl<ware_t>::operator[](unsigned int)
  0.43    132.19     0.85 209704474     0.00     0.00  koord3d::koord3d()
  0.43    133.04     0.85  9694196     0.00     0.00  dingliste_t::add(ding_t*)
  0.42    133.88     0.84 23135109     0.00     0.00  array_tpl<ware_production_t>::empty() const
  0.42    134.71     0.83 12019556     0.00     0.00  ware_production_t::book_stat(long long, int)
  0.41    135.52     0.81 12484087     0.00     0.00  haltestelle_t::get_ware_summe(ware_besch_t const*) const
  0.40    136.31     0.79 89710351     0.00     0.00  ding_t::get_pos() const
  0.40    137.10     0.79 64364640     0.00     0.00  karte_t::lookup(koord3d) const
  0.40    137.89     0.79 13660007     0.00     0.00  vehikel_basis_t::calc_height()
  0.38    138.64     0.75 125785933     0.00     0.00  array_tpl<vehikel_t*>::operator[](unsigned int)
  0.36    139.35     0.71  8960129     0.00     0.00  fabrik_t::produktion(unsigned int, long) const
  0.36    140.06     0.71 104701849     0.00     0.00  quickstone_tpl<haltestelle_t>::operator->() const
  0.32    140.69     0.63 17919108     0.00     0.00  ware_t::get_besch() const
  0.32    141.32     0.62 118705336     0.00     0.00  fussgaenger_t::sync_step(long)
  0.31    141.94     0.61  3399243     0.00     0.00  senke_t::step(long)
  0.28    142.50     0.56 102448046     0.00     0.00  quickstone_tpl<haltestelle_t>::quickstone_tpl(quickstone_tpl<haltestelle_t> const&)
  0.28    143.06     0.56  2290027     0.00     0.00  grund_t::display_dinge_all(short, short, short, bool) const
  0.28    143.62     0.56    15678     0.00     0.01  karte_t::step()
  0.28    144.16     0.55   101638     0.00     0.00  sparse_tpl<unsigned char>::move_data(unsigned short, unsigned short, signed char)
  0.27    144.71     0.54  8899116     0.00     0.00  binary_heap_tpl<route_t::ANode*>::insert(route_t::ANode*)
  0.27    145.24     0.53 304069924     0.00     0.00  vector_tpl<ware_t>::get_count() const
  0.27    145.76     0.53 16406050     0.00     0.00  clip_line_t::inc_y(xrange&, int&, int&) const
  0.26    146.28     0.52 144055411     0.00     0.00  grund_t::get_grund_hang() const
  0.26    146.81     0.52                             _Unwind_SjLj_Register
  0.25    147.29     0.49  6751438     0.00     0.00  display_img_aux(unsigned int, short, short, signed char, int, int)
  0.24    147.76     0.47 46571481     0.00     0.00  ware_t::same_destination(ware_t const&) const
  0.23    148.22     0.46  6509076     0.00     0.00  vehikel_t::hop_check()
  0.23    148.68     0.45 25998067     0.00     0.00  bildliste_besch_t::get_bild(unsigned short) const
  0.23    149.12     0.45 24737745     0.00     0.00  marker_t::ist_markiert(grund_t const*) const
  0.22    149.57     0.45                             operator+(koord const&, koord const&)
  0.22    150.01     0.44   902226     0.00     0.00  slist_tpl<grund_t const*>::is_contained(grund_t const*) const
  0.21    150.43     0.42 14544436     0.00     0.00  vehikel_t::rauche() const
  0.21    150.85     0.42 11380264     0.00     0.00  vector_tpl<haltestelle_t::connection_t>::begin() const
  0.21    151.26     0.41 69910505     0.00     0.00  grund_t::get_weg_nr(int) const
  0.20    151.66     0.40 22765275     0.00     0.00  planquadrat_t::get_kartenboden() const
  0.20    152.06     0.40   510879     0.00     0.00  haltestelle_t::vereinige_waren(ware_t const&)
  0.20    152.45     0.39 15300940     0.00     0.00  get_xrange_and_step_y(int&, int&)
  0.20    152.84     0.39    14593     0.00     0.00  vector_tpl<sync_steppable*>::remove(sync_steppable* const&)
  0.19    153.22     0.38 18411039     0.00     0.00  slist_tpl<quickstone_tpl<haltestelle_t> >::iterator::operator++()
  0.19    153.59     0.37   587635     0.00     0.00  convoi_t::hat_gehalten(quickstone_tpl<haltestelle_t>)
  0.18    153.95     0.36 23717422     0.00     0.00  ding_t::set_flag(ding_t::flag_values)
  0.18    154.30     0.35 95197333     0.00     0.00  ware_t::get_index() const
  0.18    154.65     0.35 61957680     0.00     0.00  array_tpl<ware_production_t>::operator[](unsigned int)
  0.18    155.00     0.35 33703870     0.00     0.00  bildliste_besch_t const* obj_besch_t::get_child<bildliste_besch_t>(int) const
  0.17    155.34     0.34 43229722     0.00     0.00  quickstone_tpl<convoi_t>::operator->() const
  0.17    155.68     0.34 14771641     0.00     0.00  ware_production_t::book_weighted_sum_storage(long long)

ӔO

#6
Quote from: dustNbone on April 10, 2012, 07:31:06 AM
Has the servers' savegame been changed with the lower traffic setting? I would like to get a local copy to experiment with, as it's sort of a known performance benchmark for me at this point.  Thanks for all your work on this James, it seems like very demanding work.
This is the last loadable one I got from the server.

http://dl.dropbox.com/u/17111233/client1-network.rar

PS: responds better if you set game speed to lowest before loading.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

prissi

#7
Ok, I got curious what the problem is with experimental.

First a commetn: You should really try to do compile on MinGW james. There are many unused variables and some dubious float to int warnings and use of macros for min instead the built-in functions.

simplan.cc swap is wrong. You cannot swap a union. Rather swap a.data.one with b.data.one:

void swap(planquadrat_t& a, planquadrat_t& b)
{
    sim::swap(a.this_halt, b.this_halt);
    sim::swap(a.halt_list, b.halt_list);
    sim::swap(a.ground_size, b.ground_size);
    sim::swap(a.halt_list_count, b.halt_list_count);
    sim::swap(a.data.one, b.data.one);
}


For exactly the same game experimental runs at 15-20% of the speed of standard (under fast forward).

I get tons of errors

ERROR: float32e8_t::to_sint32() const:    Cannot convert float32e8_t value 2.28357E+010 to sint32: exponent 35 >= 32 exceed sint32 range
Please report all errors to
http://forum.simutrans.com/


The logfile was over 174 MB after a month. Without this, the fast forward speed is 15-25% still 4 times slower than standard. Overall it was 23% for the same game as standard.

Also crossings seems to be completely broken, I had happily cars entering a crossing which was prepareing for closing. Also on said crossings BOTH rail and car vehicles war present. Citycars also drive through each other on curves. Citycars also seems impossible to cross rails.

Here is the profiling. It seems the "physical acceleration code" (which is not too physical, but anyhow) does eat up a lot of resources. Even the creator  float32e8_t::float32e8_t(float32e8_t const&) takes more time than the entire convoi_t::sync_step code in standard, not to mention the other float32e8_t routines. adverse_summary_t::add_vehicle(vehikel_t const&) takes also a lot of time, for unknown reasons. But really really most time (more than 13% of the total time) is spend in hashtable of departure_data_t. Here optimisation seems most important.

This map had lots of citycars, albeit it was a standard game. Thus I am not sure what default settings are applied in such a case.


Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
time   seconds   seconds    calls   s/call   s/call  name   
  5.07     41.43    41.43                             display_img_nc(short, short, short, unsigned short const*)
  4.93     81.69    40.26  3892658     0.00     0.00  haltestelle_t::hole_ab(ware_besch_t const*, unsigned int, schedule_t const*, spieler_t const*, convoi_t*, bool)
  4.23    116.22    34.53 3828229398     0.00     0.00  slist_iterator_tpl<hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::node_t>::next()
  3.21    142.44    26.23 215030639     0.00     0.00  hashtable_iterator_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::next()
  2.99    166.90    24.45    40326     0.00     0.00  karte_t::sync_step(long, bool, bool)
  2.81    189.87    22.97 3646827705     0.00     0.00  slist_iterator_tpl<hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::node_t>::slist_iterator_tpl(slist_tpl<hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::node_t> const*)
  2.19    207.78    17.91 870274709     0.00     0.00  ild(unsigned int)
  1.97    223.91    16.13 1532887415     0.00     0.00  ware_t::get_index() const
  1.96    239.88    15.98 379914910     0.00     0.00  dingliste_t::bei(unsigned char) const
  1.91    255.53    15.65 1395831656     0.00     0.00  float32e8_t::float32e8_t(float32e8_t const&)
  1.82    270.44    14.90 206902901     0.00     0.00  haltestelle_t::get_ware_summe(ware_besch_t const*) const
  1.81    285.24    14.80 366807953     0.00     0.00  grund_t::get_weg(waytype_t) const
  1.70    299.10    13.86 335089993     0.00     0.00  planquadrat_t::get_boden_in_hoehe(short) const
  1.47    311.11    12.01 522801275     0.00     0.00  grund_t::get_hoehe() const
  1.41    322.62    11.51 562986827     0.00     0.00  float32e8_t::operator*(float32e8_t const&) const
  1.35    333.69    11.07 2915334486     0.00     0.00  vector_tpl<ware_t>::operator[](unsigned int) const
  1.32    344.50    10.81 688757119     0.00     0.00  karte_t::ist_in_kartengrenzen(short, short) const
  1.24    354.63    10.14 3610720500     0.00     0.00  slist_iterator_tpl<hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::node_t>::operator=(slist_iterator_tpl<hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::node_t> const&)
  1.23    364.70    10.06 120455395     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_t const&)
  1.20    374.48     9.78 1619952371     0.00     0.00  vector_tpl<ware_t>::get_count() const
  1.19    384.24     9.76 65361246     0.00     0.00  convoi_t::step()
  1.15    393.60     9.36 1464848705     0.00     0.00  quickstone_tpl<haltestelle_t>::operator==(quickstone_tpl<haltestelle_t> const&) const
  1.06    402.29     8.69 64816086     0.00     0.00  convoi_t::sync_step(long)
  1.06    410.94     8.65                             pixcopy(unsigned short*, unsigned short const*, unsigned short const*)
  1.01    419.22     8.28 325293432     0.00     0.00  vehikel_t::get_besch() const
  0.98    427.26     8.04 355624379     0.00     0.00  float32e8_t::operator+(float32e8_t const&) const
  0.98    435.29     8.02      617     0.01     0.02  path_explorer_t::compartment_t::step()
  0.98    443.27     7.99 2253791205     0.00     0.00  vector_tpl<ware_t>::operator[](unsigned int)
  0.90    450.62     7.35 367003448     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  0.85    457.60     6.97 1173650749     0.00     0.00  float32e8_t::set_value(unsigned int)
  0.84    464.50     6.90 37536635     0.00     0.00  convoy_t::calc_move(long, float32e8_t const&, weight_summary_t const&, int, int&, int&)
  0.84    471.38     6.89 2046990871     0.00     0.00  ware_t::get_besch() const
  0.77    477.70     6.32 1120572758     0.00     0.00  koord::koord(short, short)
  0.75    483.81     6.11 35644151     0.00     0.00  convoi_t::increment_odometer(unsigned int)
  0.75    489.92     6.10 177578144     0.00     0.00  convoi_t::departure_data_t::increment_way_distance(unsigned char, unsigned int)
  0.70    495.64     5.73 390605717     0.00     0.00  ding_t::get_flag(ding_t::flag_values) const
  0.64    500.92     5.27 716144923     0.00     0.00  koord3d::get_2d() const
  0.60    505.81     4.89 115050584     0.00     0.00  stadt_t::bewerte_loc(koord, rule_t const&, int)
  0.58    510.57     4.77 519210668     0.00     0.00  convoi_t::get_vehikel(unsigned short) const
  0.57    515.25     4.67                             __udivdi3
  0.56    519.82     4.57 14568875     0.00     0.00  fabrik_t::step(long)
  0.49    523.79     3.98 136563666     0.00     0.00  ding_t::is_moving() const
  0.49    527.77     3.98 29321875     0.00     0.00  haltestelle_t::recalc_status()
  0.48    531.73     3.95 2220901292     0.00     0.00  ware_besch_t::get_catg_index() const
  0.45    535.41     3.69 385915789     0.00     0.00  ding_t::get_pos() const
  0.44    538.98     3.56                             display_img_wc(short, short, short, unsigned short const*)
  0.43    542.52     3.55 688686362     0.00     0.00  karte_t::lookup(koord) const
  0.43    546.07     3.54 196787107     0.00     0.00  float32e8_t::operator/(float32e8_t const&) const
  0.43    549.58     3.51 597372155     0.00     0.00  array_tpl<vehikel_t*>::operator[](unsigned int) const
  0.43    553.05     3.48 478457347     0.00     0.00  float32e8_t::set_value(float32e8_t const&)
  0.36    556.00     2.94 191886192     0.00     0.00  fussgaenger_t::sync_step(long)
  0.36    558.92     2.93 53960822     0.00     0.00  quickstone_tpl<simline_t>::is_bound() const
  0.35    561.82     2.89 239473337     0.00     0.00  vehikel_t::get_speed_limit() const
  0.35    564.70     2.88 37536635     0.00     0.00  convoi_t::calc_acceleration(long)
  0.34    567.44     2.75 73111318     0.00     0.00  float32e8_t::operator-(float32e8_t const&) const
  0.33    570.12     2.68 2004657021     0.00     0.00  ware_t::get_zwischenziel() const
  0.33    572.78     2.66 365345891     0.00     0.00  vector_tpl<sync_steppable*>::append(sync_steppable* const&)
  0.32    575.41     2.63 1537304332     0.00     0.00  ware_besch_t::get_index() const
  0.32    578.04     2.63                             void display_img_pc<(pixcopy_routines)0>(short, short, short, unsigned short const*)
  0.31    580.56     2.52 411408986     0.00     0.00  grund_t::get_weg_nr(int) const
  0.29    582.89     2.33 59299316     0.00     0.00  stadtauto_t::sync_step(long)
  0.28    585.20     2.31 35003253     0.00     0.00  display_img_aux(unsigned int, short, short, signed char, int, int)
  0.27    587.43     2.23 240918510     0.00     0.00  float32e8_t::operator+=(int)
  0.27    589.63     2.20 379026792     0.00     0.00  float32e8_t::set_zero()
  0.27    591.82     2.19 107299523     0.00     0.00  clip_line_t::inc_y(xrange&, int&, int&) const
  0.27    594.01     2.19 13295933     0.00     0.00  fabrik_t::book_weighted_sums(long long)
  0.27    596.18     2.17    31584     0.00     0.00  stadt_t::baue(bool)
  0.26    598.35     2.16 37540495     0.00     0.00  existing_convoy_t::update_weight_summary(weight_summary_t&)
  0.26    600.50     2.15 214573773     0.00     0.00  ware_t::can_merge_with(ware_t const&) const
  0.26    602.62     2.12 240918510     0.00     0.00  float32e8_t::operator+(int) const
  0.26    604.72     2.10 150217502     0.00     0.00  weg_t::get_max_speed() const
  0.25    606.79     2.08 378567849     0.00     0.00  grund_t::obj_bei(unsigned char) const
  0.25    608.88     2.08  5321925     0.00     0.00  senke_t::step(long)
  0.25    610.95     2.07 84959661     0.00     0.00  grund_t::get_vmove(unsigned char) const
  0.23    612.78     1.84 786141044     0.00     0.00  float32e8_t::float32e8_t(int)
  0.23    614.62     1.84 37540495     0.00     0.00  existing_convoy_t::update_adverse_summary(adverse_summary_t&)
  0.22    616.45     1.82 166502949     0.00     0.00  float32e8_t::operator<(float32e8_t const&) const
  0.22    618.23     1.78 88643625     0.00     0.00  get_xrange_and_step_y(int&, int&)
  0.22    619.99     1.76 255948563     0.00     0.00  planquadrat_t::get_kartenboden() const
  0.21    621.73     1.74 63377201     0.00     0.00  slist_iterator_tpl<ware_t>::next()
  0.21    623.45     1.73 823739546     0.00     0.00  float32e8_t::set_value(int)
  0.21    625.17     1.72 336293495     0.00     0.00  karte_t::lookup(koord3d) const
  0.21    626.88     1.71  8540506     0.00     0.00  vehikel_t::hop()
  0.20    628.55     1.68 120459255     0.00     0.00  weight_summary_t::add_weight(int, int)
  0.20    630.17     1.62 43704432     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, koord) const
  0.19    631.70     1.53 66873388     0.00     0.00  bild_besch_t::get_nummer() const
  0.18    633.20     1.50 37540495     0.00     0.00  existing_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  0.18    634.67     1.48                             _Unwind_SjLj_Unregister
  0.18    636.15     1.48 15733166     0.00     0.00  dingliste_t::remove(ding_t const*)
  0.18    637.61     1.46 31321685     0.00     0.00  haltestelle_t::get_pax_enabled() const
  0.17    639.04     1.43 120455395     0.00     0.00  weight_summary_t::add_vehicle(vehikel_t const&)
  0.17    640.44     1.40                             _Unwind_SjLj_Register
  0.17    641.83     1.39 148196314     0.00     0.00  convoi_t::get_vehikel_anzahl() const
  0.17    643.22     1.39 120625977     0.00     0.00  float32e8_t::float32e8_t(unsigned int, unsigned int)
  0.16    644.51     1.29 13712858     0.00     0.00  fabrik_t::produktion(unsigned int, long) const
  0.16    645.80     1.29 400171856     0.00     0.00  ding_t::set_flag(ding_t::flag_values)
  0.16    647.10     1.29  1147702     0.00     0.00  haltestelle_t::vereinige_waren(ware_t const&)
  0.16    648.38     1.29                             mark_tiles_dirty(int, int, int)
  0.16    649.65     1.27 77451208     0.00     0.00  bildliste_besch_t::get_bild(unsigned short) const
  0.15    650.90     1.25 27456800     0.00     0.00  ding_t::display(int, int, bool) const
  0.15    652.14     1.24 1205262406     0.00     0.00  float32e8_t::float32e8_t()
  0.15    653.38     1.24 371764966     0.00     0.00  koord3d::koord3d()
  0.15    654.60     1.21   112150     0.00     0.00  route_t::intern_calc_route(karte_t*, koord3d, koord3d, fahrer_t*, int, unsigned int, unsigned int)
  0.15    655.80     1.21 35476396     0.00     0.00  existing_convoy_t::get_force_summary(int)
  0.15    656.99     1.19 94909448     0.00     0.00  simrand(unsigned int, char const*)
  0.15    658.18     1.19    25828     0.00     0.03  karte_t::step()
  0.14    659.36     1.18    15801     0.00     0.00  karte_ansicht_t::display(bool)
  0.14    660.49     1.13  7945521     0.00     0.00  binary_heap_tpl<route_t::ANode*>::pop()
  0.14    661.62     1.12 114627970     0.00     0.00  vehikel_besch_t::get_effective_force_index(int) const
  0.14    662.74     1.12 282683782     0.00     0.00  quickstone_tpl<haltestelle_t>::quickstone_tpl(quickstone_tpl<haltestelle_t> const&)
  0.14    663.86     1.12 106367170     0.00     0.00  quickstone_tpl<haltestelle_t>::is_bound() const
  0.13    664.96     1.10 333819095     0.00     0.00  vector_tpl<unsigned short>::operator[](unsigned int) const
  0.13    666.05     1.10 21938458     0.00     0.00  hashtable_iterator_tpl<quickstone_tpl<haltestelle_t>, haltestelle_t::connexion*, quickstone_hash_tpl<haltestelle_t> >::next()
  0.13    667.15     1.09 69278056     0.00     0.00  simrand_plain()
  0.13    668.24     1.09 75073270     0.00     0.00  v_to_speed(float32e8_t const&)
  0.13    669.31     1.07  1808344     0.00     0.00  hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::get_count() const
  0.13    670.36     1.05 134111253     0.00     0.00  slist_iterator_tpl<hashtable_tpl<quickstone_tpl<haltestelle_t>, haltestelle_t::connexion*, quickstone_hash_tpl<haltestelle_t> >::node_t>::next()
  0.13    671.39     1.03   581092     0.00     0.00  display_text_proportional_len_clip(short, short, char const*, int, unsigned short, long)
  0.12    672.40     1.01 123230102     0.00     0.00  vehikel_t::get_gesamtgewicht() const


But please, verify this yourself!

jamespetts

#8
Prissi,

thank you very much for looking into this. I did try profiling on a Linux machine over the week-end, but for some reason could not get meaningful results (i.e., the "time" column showed zero percent for everything). I shall have another go with MinGW in Windows when I get a chance. Thank you also for reporting the errors. May I ask - what are the steps to reproduce the float32e8_t error that you encountered? I have not seen that before.

Also, given your findings, do you think that there would be merit in using a memory pool for float32e8_t objects?

Edit: I suspect that the reason that


hashtable_iterator_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::next()


takes such a high proportion of the time is this code here (reproduced from the -devel branch where the iterator templates have been replaced by the FOR syntax):


void convoi_t::increment_odometer(uint32 steps)
{
   // Increament the way distance: used for apportioning revenue by owner of ways.
   // Use steps, as only relative distance is important here.
   sint8 player;
   waytype_t waytpe = fahr[0]->get_waytype();
   weg_t* way = welt->lookup(get_pos())->get_weg(waytpe);
   if(way == NULL)
   {
      player = besitzer_p->get_player_nr();
   }
   else
   {
      if(waytpe == road_wt && way->get_player_nr() == 1 && welt->get_settings().get_toll_free_public_roads())
      {
         player = besitzer_p->get_player_nr();
      }
      else
      {
         player = way->get_player_nr();
      }
   }

   if(player < 0)
   {
      player = besitzer_p->get_player_nr();
   }

   FOR(departure_map, & i, *departures)
   {
      i.value.increment_way_distance(player, steps);
   }
   
   steps_since_last_odometer_increment += steps;
   if ( steps_since_last_odometer_increment < welt->get_settings().get_steps_per_km())
   {
      return;
   }
...


I am wondering whether the departure data can be updated less often - once per stop, for example, rather than once per kilometre.

Edit 2: Actually, I don't think that I can change this - it is necessary to evaluate what proportion of each convoy's journey happened over which players' ways, which requires mapping each tile traversed to a specific player. Hmm. I wonder whether there is any other way in which this could be done more efficiently...?

Edit 3: I have made some minor optimisations of the physics on the -devel branch to reduce the number of calls to the constructor of float32e8_t.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

The float32e8_t error appeared from loading the yoshi savegame: http://www.physik.tu-berlin.de/~prissi/simutrans/yoshi87-2-102.sve my standard benchmark game.

Instead of a memory pool, I would rather drop the acceleration code completely (even more since it is not physically correct for anything but diesel and electric train engines) and make one entirely based on integers.

As for your departure maps, why does this statistics is not incorporated into the convoi? It woudl be much less hassle. But sorry, I would need to study the purpose of this, which is not what I want and neither I got time for this.

inkelyad

Quote from: prissi on April 12, 2012, 10:24:26 AM
I would rather drop the acceleration code completely (even more since it is not physically correct for anything but diesel and electric train engines) and make one entirely based on integers.
Maybe we are doing physics in wrong way? Something like big (~0.5-2Mb) pre-calculated static table and integer-based interpolation can do wonders to program speed.

prissi

Standard has already a well working constant force (i.e. tractive effort) code using entirely integers. You "just" need to add a quadratic routine that works without too fast/slow acceleration (which is a problem also with the existing in experimental imho ... ) But of course I am biased as the standard code was my first patch.

jamespetts

I shall have to look into Yoshi's game and conduct some proper profiling when I get a chance - hopefully over the week-end.

As to the physics, I know that you probably know more about physics than everyone else here combined; my understanding is, however, that the Standard physics code is deliberately somewhat simplified. I am certainly aiming for a model that is as realistic as can possibly be achieved (as there is an important link between physics and economics), and some brief tests show that the current model does appear more or less accurately to simulate acceleration time. Bernd Gabriel has put a lot of work into the code, and has attempted to make it as realistic as he can; I do not have the skill or mathematical understanding to program a replacement physics engine, so I do not presently see an alternative to retaining what we have in Experimental currently if I want to maintain (which I do) the separate specification of power and tractive effort and physical braking. May I ask, however, out of interest - in what respect is Experimental's current physics model inaccurate?

I have attempted to make some small optimisations to reduce the number of calls to the float32e8_t double integer constructor (as opposed to the much lighter copy constructor), which hopefully will help a little.

As to the departure maps, the aim of the feature is to give data about the distance travelled on each players' ways between each stop and every other stop on the convoy's route. A possibility for reducing load on the hashtable iterator might be, I suppose, to have steps since the last stop stored in a fixed array of players in the convoy, and added to the departure hashtable just once on arrival at every stop, but I wonder whether this would eat too much memory (on the other hand performance seems to be restricted more by CPU than memory in Simutrans, so it might be worth a try).

However, these are all really rather small issues by comparison to the impact of a great many city cars on performance, as demonstrated by the enormous difference in responsiveness to the server game after the city cars had been removed from the map. As Prissi suggests, I shall have to profile under MinGW and see which method(s) take the most CPU time here before deciding how to deal with things.

Thank you all (and especially Prissi) for your help!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

If you can understand japanese, this series of videos goes into detail about power, acceleration, top speed, gear ratio and power consumption for electrics. http://www.nicovideo.jp/watch/sm17409337
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

prissi

Experimentals model is inacurate as it needs to modify the scales by design. But away from the formal argument:

(Slower) steam trains, ship and planes are constant force machines, i.e. the should only have a tracktive effort which reduces with increasing speed in case of steam engines and no power at all. Those are actually handled correctly by standard already.

Cars should rather the constant power, as friction is nearly not limiting acceleration (but this leaves gear shifting completely out of the picture). This will lead to instant acceleration to 50 km/h, which is realistic, even with tiles as short as 50 m.

Any friction model will not work properly with road transport, as friction there is varying greatly between a steel tire traktor on a dirty road and a highway. Not to mention ships at all.

Also an upward slope does not really affect a train much, even though the highest mountians on a typical map are less than 10 steps. On a downward slope the train strongly accelerates then. I a game side by side to standard the experimental trains accelerate faster, are not really affected by corners and otherwise are generally about 5-10% faster between stations (due to faster acceleration).

Anyway, I wrote this many times already.

isidoro

Quote from: jamespetts on April 12, 2012, 09:30:00 PM
[...]
As to the physics, I know that you probably know more about physics than everyone else here combined;
[...]

Well, well, speak for yourself...   ;)


Carl

Experimental trains are, at least, very strongly affected by 90 degree corners.

jamespetts

#17
I have now been able to take Prissi's advice and run a profiling test on the current server game (with the -devel branch compiled with MinGW). Here are the results (truncated to show only those taking more than 0.01%):


Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total         
time   seconds   seconds    calls  Ks/call  Ks/call  name   
19.31    288.23   288.23 1473357178     0.00     0.00  float32e8_t::operator*(float32e8_t const&) const
11.79    464.17   175.94   442668     0.00     0.00  stadtauto_t::~stadtauto_t()
  8.48    590.72   126.55 1278363998     0.00     0.00  ild(unsigned int)
  7.29    699.48   108.76                             __udivdi3
  6.88    802.14   102.67 627248548     0.00     0.00  float32e8_t::operator+(float32e8_t const&) const
  6.32    896.52    94.38 1506866306     0.00     0.00  existing_convoy_t::get_brake_summary(int)
  5.89    984.47    87.94  7569060     0.00     0.00  convoy_t::calc_move(long, float32e8_t const&, weight_summary_t const&, int, int, int, int, int&, int&, float32e8_t&)
  5.22   1062.40    77.94 4121818651     0.00     0.00  float32e8_t::set_value(unsigned int)
  4.74   1133.15    70.75 3491626288     0.00     0.00  float32e8_t::operator/(float32e8_t const&) const
  3.46   1184.88    51.72   630510     0.00     0.00  karte_t::sync_remove(sync_steppable*)
  3.43   1236.03    51.15     7451     0.00     0.00  karte_t::sync_step(long, bool, bool)
  2.68   1275.99    39.97 4105032024     0.00     0.00  float32e8_t::set_value(int)
  1.83   1303.38    27.38 3482813364     0.00     0.00  float32e8_t::to_sint32() const
  1.30   1322.71    19.34 148655550     0.00     0.00  stadtauto_t::hop_check()
  1.04   1338.26    15.54 161053270     0.00     0.00  vehikel_basis_t::no_cars_blocking(grund_t const*, convoi_t const*, unsigned char, unsigned char, unsigned char)
  0.91   1351.85    13.59 439364847     0.00     0.00  lazy_convoy_t::get_adverse_summary()
  0.84   1364.32    12.47 1536845550     0.00     0.00  float32e8_t::operator-(float32e8_t const&) const
  0.83   1376.66    12.34 1531188276     0.00     0.00  stadtauto_t::sync_step(long)
  0.67   1386.68    10.03 45812265     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_t const&)
  0.59   1395.42     8.74 368898601     0.00     0.00  grund_t::get_weg_ribi_unmasked(waytype_t) const
  0.48   1402.64     7.21 201679526     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, unsigned char) const
  0.39   1408.48     5.84  5696629     0.00     0.00  display_img_aux(unsigned int, short, short, signed char, int, int)
  0.36   1413.80     5.32 59104029     0.00     0.00  get_pair(int)
  0.33   1418.71     4.91 144323788     0.00     0.00  stadtauto_t::ist_weg_frei(grund_t*)
  0.29   1423.10     4.39                             BZ2_bzDecompress@4
  0.27   1427.07     3.97                             BZ2_decompress
  0.21   1430.17     3.10  6265028     0.00     0.00  convoi_t::increment_odometer(unsigned int)
  0.19   1432.97     2.80 674591689     0.00     0.00  vehikel_basis_t::calc_richtung(koord, koord)
  0.18   1435.61     2.64   654130     0.00     0.00  haltestelle_t::hole_ab(ware_besch_t const*, unsigned int, schedule_t const*, spieler_t const*, convoi_t*, bool)
  0.16   1437.97     2.36 1506866306     0.00     0.00  convoy_t::get_braking_force(int)
  0.14   1440.11     2.14  8621842     0.00     0.00  existing_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  0.13   1442.10     1.99  7569060     0.00     0.00  convoi_t::calc_acceleration(long)
  0.11   1443.79     1.69 371830490     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  0.11   1445.47     1.69 31555999     0.00     0.00  vehikel_basis_t::calc_height()
  0.11   1447.15     1.68                             operator<<(std::ostream&, float32e8_t const&)
  0.10   1448.71     1.56  1041418     0.00     0.00  stadt_t::find_destination(stadt_t::factory_set_t&, long long, stadt_t::pax_return_type*, unsigned int, unsigned int, koord)
  0.10   1450.25     1.54    19074     0.00     0.00  route_t::intern_calc_route(karte_t*, koord3d, koord3d, fahrer_t*, int, unsigned int, unsigned int)
  0.09   1451.65     1.40 1557232285     0.00     0.00  stadtauto_t::get_typ() const
  0.09   1453.00     1.35  6831945     0.00     0.00  stadt_t::add_target_attraction(gebaeude_t*)
  0.09   1454.32     1.32 879801686     0.00     0.00  strasse_t::get_waytype() const
  0.09   1455.59     1.27 25121575     0.00     0.00  dingliste_t::remove(ding_t const*)
  0.08   1456.85     1.26                             global constructors keyed to _ZlsRSoRK11float32e8_t
  0.08   1458.06     1.21                             non-virtual thunk to stadtauto_t::sync_step(long)
  0.08   1459.26     1.20 17466261     0.00     0.00  stadtauto_t::calc_current_speed()
  0.08   1460.45     1.19 24285649     0.00     0.00  vehikel_basis_t::verlasse_feld()
  0.07   1461.53     1.08  6148183     0.00     0.00  gebaeude_t* const& pick_any_weighted<gebaeude_t*, weighted_vector_tpl>(weighted_vector_tpl<gebaeude_t*> const&)
  0.07   1462.59     1.06 18798252     0.00     0.00  stadtauto_t::calc_bild()
  0.07   1463.62     1.03      120     0.00     0.00  path_explorer_t::compartment_t::step()
  0.06   1464.48     0.86 133182401     0.00     0.00  koord3d const& pick_any_weighted<koord3d, weighted_vector_tpl>(weighted_vector_tpl<koord3d> const&)
  0.06   1465.34     0.86 47001462     0.00     0.00  void templated_pixcopy<(pixcopy_routines)0>(unsigned short*, unsigned short const*, unsigned short const*)
  0.05   1466.10     0.76 443308536     0.00     0.00  grund_t::get_weg_hang() const
  0.05   1466.85     0.75 12962313     0.00     0.00  convoi_t::step()
  0.05   1467.59     0.74 24753350     0.00     0.00  dingliste_t::intern_add_moving(ding_t*)
  0.05   1468.30     0.71                             potential_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  0.05   1468.99     0.69 148808632     0.00     0.00  simrand(unsigned int, char const*)
  0.04   1469.63     0.64   521461     0.00     0.00  waggon_t::block_reserver(route_t*, unsigned short, unsigned short&, unsigned short&, int, bool, bool) const
  0.04   1470.25     0.62  9907725     0.00     0.00  grund_t::calc_back_bild(signed char, signed char)
  0.04   1470.84     0.58  6236306     0.00     0.00  vehikel_t::hop()
  0.04   1471.40     0.57 45812265     0.00     0.00  weight_summary_t::add_weight(int, int)
  0.04   1471.95     0.55  8621842     0.00     0.00  existing_convoy_t::update_weight_summary(weight_summary_t&)
  0.03   1472.47     0.52 12436921     0.00     0.00  convoi_t::sync_step(long)
  0.03   1472.98     0.51 499976285     0.00     0.00  verkehrsteilnehmer_t::get_waytype() const
  0.03   1473.43     0.45 148625216     0.00     0.00  simrand_plain()
  0.03   1473.85     0.42 29534801     0.00     0.00  stadt_t::is_within_city_limits(koord) const
  0.03   1474.27     0.41 152893260     0.00     0.00  ribi_typ(koord, koord)
  0.03   1474.64     0.38   593171     0.00     0.00  float32e8_t::log2() const
  0.02   1474.99     0.35                             BZ2_bzRead@16
  0.02   1475.34     0.34 45812265     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_besch_t const&, bool)
  0.02   1475.67     0.33 17892098     0.00     0.00  stadtauto_t::hop()
  0.02   1475.99     0.33 17892098     0.00     0.00  stadtauto_t::betrete_feld()
  0.02   1476.32     0.32 155095776     0.00     0.00  ribi_typ(koord)
  0.02   1476.63     0.32  6997286     0.00     0.00  vehikel_t::calc_bild()
  0.02   1476.94     0.31  4383968     0.00     0.00  wasser_t::calc_bild_internal()
  0.02   1477.24     0.30 25105606     0.00     0.00  marker_t::ist_markiert(grund_t const*) const
  0.02   1477.54     0.29   642837     0.00     0.00  automobil_t::ist_weg_frei(int&, bool)
  0.02   1477.81     0.27  7701778     0.00     0.00  haltestelle_t::get_halt(karte_t const*, koord3d, spieler_t const*)
  0.02   1478.08     0.27  4696811     0.00     0.00  vehikel_besch_t::get_bild_nr(unsigned char, ware_besch_t const*, char const*) const
  0.02   1478.35     0.27  1178101     0.00     0.00  waggon_t::ist_weg_frei(int&, bool)
  0.02   1478.61     0.26   802058     0.00     0.00  stadt_t::get_zufallspunkt(unsigned int, unsigned int, koord) const
  0.02   1478.85     0.24   455706     0.00     0.00  void weighted_vector_tpl<stadt_t::target_city_t>::insert_ordered<bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&)>(stadt_t::target_city_t const&, unsigned long, bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&), unsigned int)
  0.01   1479.07     0.22   593171     0.00     0.00  float32e8_t::exp2() const
  0.01   1479.29     0.22   448357     0.00     0.00  senke_t::step(long)
  0.01   1479.51     0.22      684     0.00     0.00  karte_t::rem_stadt(stadt_t*)
  0.01   1479.71     0.21 24264494     0.00     0.00  vehikel_basis_t::calc_set_richtung(koord, koord)
  0.01   1479.92     0.21  2396394     0.00     0.00  stadt_t::step(long)
  0.01   1480.13     0.20 50490018     0.00     0.00  loadsave_t::read(void*, unsigned int)
  0.01   1480.33     0.20  4871168     0.00     0.00  planquadrat_t::rdwr(karte_t*, loadsave_t*, koord)
  0.01   1480.52     0.19                             MTgenerate()
  0.01   1480.71     0.19                             myfeof
  0.01   1480.89     0.18 328744717     0.00     0.00  verkehrsteilnehmer_t::update_bookkeeping(unsigned int)
  0.01   1481.07     0.18  8621842     0.00     0.00  existing_convoy_t::update_adverse_summary(adverse_summary_t&)
  0.01   1481.25     0.18    34963     0.00     0.00  image_reader_t::read_node(_iobuf*, obj_node_info_t&)
  0.01   1481.42     0.17    71453     0.00     0.00  convoi_t::laden()
  0.01   1481.59     0.17 10219309     0.00     0.00  convoy_t::calc_min_braking_distance(weight_summary_t const&, float32e8_t const&)
  0.01   1481.75     0.17  6279186     0.00     0.00  vehikel_t::hop_check()
  0.01   1481.91     0.16  7194972     0.00     0.00  vehikel_t::calc_speed_limit(weg_t const*, weg_t const*, fixed_list_tpl<short, 16>*, unsigned char, unsigned char)
  0.01   1482.07     0.16   319232     0.00     0.00  stadt_t::step_passagiere()
  0.01   1482.22     0.15 24275832     0.00     0.00  grund_t::get_halt() const
  0.01   1482.37     0.15   432148     0.00     0.00  sparse_tpl<unsigned char>::set_unsafe(koord, unsigned char)
  0.01   1482.52     0.15   214143     0.00     0.00  haltestelle_t::vereinige_waren(ware_t const&)
  0.01   1482.66     0.14 95459175     0.00     0.00  schiene_t::get_waytype() const
  0.01   1482.80     0.14 11515635     0.00     0.00  freelist_t::gimme_node(unsigned int)
  0.01   1482.94     0.14  2941192     0.00     0.00  grund_t::get_weg(waytype_t) const
  0.01   1483.07     0.13 78556555     0.00     0.00  stadtauto_t::is_stuck()
  0.01   1483.20     0.13 28126072     0.00     0.00  dingliste_t::add(ding_t*)
  0.01   1483.33     0.13  4905618     0.00     0.00  grund_t::rdwr(loadsave_t*)
  0.01   1483.46     0.13     3911     0.00     0.00  karte_ansicht_t::display(bool)
  0.01   1483.59     0.12  3136057     0.00     0.00  dingliste_t::suche(ding_t::typ, unsigned char) const
  0.01   1483.70     0.12 24269401     0.00     0.00  vehikel_basis_t::betrete_feld()
  0.01   1483.83     0.12  3627835     0.00     0.00  dingliste_t::display_dinge_vh(short, short, unsigned char, unsigned char, bool) const
  0.01   1483.94     0.12  2275921     0.00     0.00  dingliste_t::display_dinge_bg(short, short, unsigned char) const
  0.01   1484.07     0.12   629519     0.00     0.00  signal_t::calc_bild()
  0.01   1484.18     0.12   503201     0.00     0.00  verkehrsteilnehmer_t::~verkehrsteilnehmer_t()
  0.01   1484.29     0.11 96534327     0.00     0.00  boden_t::get_typ() const
  0.01   1484.40     0.11  3755769     0.00     0.00  vehikel_t::check_access(weg_t const*) const
  0.01   1484.51     0.11  2832690     0.00     0.00  waggon_t::ist_befahrbar(grund_t const*) const
  0.01   1484.62     0.11  2423658     0.00     0.00  baum_t::rdwr(loadsave_t*)
  0.01   1484.72     0.10  9166527     0.00     0.00  convoy_t::calc_min_braking_distance(float32e8_t const&, weight_summary_t const&, int)
  0.01   1484.82     0.10  2412772     0.00     0.00  vehikel_basis_t::get_screen_offset(int&, int&, short) const
  0.01   1484.92     0.10   939751     0.00     0.00  karte_t::lookup(koord3d) const
  0.01   1485.02     0.10   837842     0.00     0.00  gebaeude_t::get_bild() const
  0.01   1485.12     0.10        2     0.00     0.00  karte_t::laden(loadsave_t*)
  0.01   1485.22     0.10                             __divdi3
  0.01   1485.32     0.10 22080570     0.00     0.00  stadtauto_t::can_overtake(overtaker_t*, int, short)
  0.01   1485.41     0.10     1918     0.00     0.00  haltestelle_t::laden_abschliessen(bool)
  0.01   1485.50     0.09 90843049     0.00     0.00  waggon_t::get_waytype() const
  0.01   1485.59     0.09 34147001     0.00     0.00  wasser_t::ist_wasser() const
  0.01   1485.68     0.09 19557564     0.00     0.00  loadsave_t::start_tag(char const*)
  0.01   1485.77     0.09  7690536     0.00     0.00  haltestelle_t::check_access(spieler_t const*) const
  0.01   1485.86     0.09  4835501     0.00     0.00  ding_t::mark_image_dirty(unsigned short, short) const
  0.01   1485.95     0.09  1159762     0.00     0.00  grund_t::display_boden(short, short, short) const
  0.01   1486.03     0.08  9089651     0.00     0.00  array_tpl<vehikel_t*>::operator[](unsigned int)
  0.01   1486.11     0.08  6045250     0.00     0.00  existing_convoy_t::get_force_summary(int)
  0.01   1486.19     0.08  4905618     0.00     0.00  dingliste_t::rdwr(karte_t*, loadsave_t*, koord3d)
  0.01   1486.27     0.08  4260516     0.00     0.00  ding_t::display(int, int) const
  0.01   1486.35     0.08  3858157     0.00     0.00  ding_t::~ding_t()
  0.01   1486.43     0.08   387469     0.00     0.00  stadtauto_t::rdwr(loadsave_t*)
  0.01   1486.51     0.08     1950     0.00     0.00  haltestelle_t::~haltestelle_t()
  0.01   1486.59     0.08                             adler32
  0.00   1486.66     0.07  8998603     0.00     0.00  win_get_magic(long)


Any input on this would be appreciated.

Edit: It seems that deleting city cars when they have reached their time_to_life value takes more time than anything else. In Experimental, it requires removing the city cars from a list of the cars stored in their origin city to ensure that there are not too many city cars in the game. This is an slist_tpl type. The relevant code is here:


stadtauto_t::~stadtauto_t()
{
    if(!welt->get_is_shutting_down() && current_list != NULL  && current_list->get_count() > 0)
    {
        stadtauto_t *tmp = this;
        if(!current_list->remove(tmp))
        {
            DBG_MESSAGE("stadtauto_t", "Failure to remove city car from list!");
        }
        else
        {
            DBG_MESSAGE("stadtauto_t", "Succeeded in removing city car from list.");
        }
    }
    else
    {
        // Just to make sure.
        if(welt->unassigned_cars.remove(this))
        {
            DBG_MESSAGE("stadtauto_t", "Failure to remove city car from list!");
        }
        else
        {
            DBG_MESSAGE("stadtauto_t", "Succeeded in removing city car from list.");
        }
    }
    //"Buche" = "Books" (Babelfish)
}


If I used a container class other than an slist, would removal from that list be significantly faster?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

kierongreen

It means that 19% of the time is spent on floating point multiplication. There should be much more efficient ways of approximating this with integers.

Edit - you can take that further even, as other a third of cpu time is going on arithmetic here!

jamespetts

Oops - my last edit crossed with your post...

Edit: If you compare the number of calls, you will see that stadtauto_t::~stadtauto_t() takes 11.79% of the time with only 442668, compared to float32e8_t::operator*(float32e8_t const&) const with 19.31% of the time, but with 1473357178 calls - the city car deletion is the one that is less optimised by a long way, I think.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Dwachs

Instead of a list of all citycars per city maybe just store the amount of citycars originating from the city?

This looks strange too:
  3.46   1184.88    51.72   630510     0.00     0.00  karte_t::sync_remove(sync_steppable*)
  3.43   1236.03    51.15     7451     0.00     0.00  karte_t::sync_step(long, bool, bool)

Removing from the list takes more time than actually stepping everything in the list! Does experimental have more sync-steppable objects than standard?
Parsley, sage, rosemary, and maggikraut.

jamespetts

There are a large number of objects because the map is huge - the sync steppable objects are all cars. The reason to have them in an actual list is so that the cities can delete them if there are too many of them. Is there a type of list removing from which is faster than the slist?

Edit: I wonder whether there could be some benefit perhaps to having a memory pool of citycars? Although the float arithmetic takes a lot of CPU time between it (more than the city cars), the game runs with perfectly acceptable performance when there are no city cars (despite the city cars not using float arithmetic), which suggests that the performance problem is specific to the city cars and not related directly to CPU time, which suggests to me an issue with memory bandwidth with lots of objects being created and deleted. Does this seem to be a reasonable deduction here, and does the proposed solution seem sensible?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Dwachs

A possibility woudl be to use an ordered list for the city cars (for instance order them by target and / or origin), or even order them by creation date (step), so that the cities always can kill the oldest cars.

Using freelist for memory allocation for city cars can help, too, if experimental is creating / destroying citycars that frequently.
Parsley, sage, rosemary, and maggikraut.

jamespetts

#23
Hmm - not having much luck with using freelist - didn't seem to make any difference to performance at all.

Edit:  For comparison, here is a profile with the city cars turned off. The performance in this game was drastically better than in the previous game:


Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
time   seconds   seconds    calls   s/call   s/call  name   
16.19     47.82    47.82 223147350     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_t const&)
  6.57     67.21    19.39  3441670     0.00     0.00  haltestelle_t::hole_ab(ware_besch_t const*, unsigned int, schedule_t const*, spieler_t const*, convoi_t*, bool)
  5.98     84.86    17.65 1678652295     0.00     0.00  float32e8_t::operator*(float32e8_t const&) const
  5.72    101.74    16.88 38145639     0.00     0.00  convoi_t::increment_odometer(unsigned int)
  4.49    115.00    13.26 1218205234     0.00     0.00  float32e8_t::operator+(float32e8_t const&) const
  3.92    126.58    11.58 1663466806     0.00     0.00  ild(unsigned int)
  3.69    137.47    10.89 38649247     0.00     0.00  convoi_t::calc_acceleration(long)
  2.90    146.03     8.56    19027     0.00     0.00  karte_t::sync_step(long, bool, bool)
  2.89    154.56     8.53 42168017     0.00     0.00  existing_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  2.63    162.33     7.78 1892005273     0.00     0.00  float32e8_t::set_value(unsigned int)
  2.10    168.53     6.20  4299642     0.00     0.00  stadt_t::find_destination(stadt_t::factory_set_t&, long long, stadt_t::pax_return_type*, unsigned int, unsigned int, koord)
  2.01    174.46     5.93                             __udivdi3
  1.54    179.00     4.54    97141     0.00     0.00  route_t::intern_calc_route(karte_t*, koord3d, koord3d, fahrer_t*, int, unsigned int, unsigned int)
  1.36    183.03     4.03  2934232     0.00     0.00  display_img_aux(unsigned int, short, short, signed char, int, int)
  1.34    186.97     3.95 25410954     0.00     0.00  gebaeude_t* const& pick_any_weighted<gebaeude_t*, weighted_vector_tpl>(weighted_vector_tpl<gebaeude_t*> const&)
  1.30    190.81     3.83                             BZ2_bzDecompress@4
  1.26    194.51     3.71                             BZ2_decompress
  1.19    198.03     3.52 63124554     0.00     0.00  existing_convoy_t::get_brake_summary(int)
  1.18    201.52     3.48 608402685     0.00     0.00  float32e8_t::operator/(float32e8_t const&) const
  1.18    205.00     3.48 38649247     0.00     0.00  convoy_t::calc_move(long, float32e8_t const&, weight_summary_t const&, int, int, int, int, int&, int&, float32e8_t&)
  1.11    208.28     3.29 25322562     0.00     0.00  vehikel_t::hop()
  1.05    211.38     3.09 1808773405     0.00     0.00  float32e8_t::set_value(int)
  0.97    214.22     2.85  2248058     0.00     0.00  waggon_t::block_reserver(route_t*, unsigned short, unsigned short&, unsigned short&, int, bool, bool) const
  0.84    216.72     2.49 42168017     0.00     0.00  existing_convoy_t::update_weight_summary(weight_summary_t&)
  0.84    219.19     2.48 26633289     0.00     0.00  dingliste_t::intern_add_moving(ding_t*)
  0.82    221.62     2.43 223147367     0.00     0.00  weight_summary_t::add_weight(int, int)
  0.82    224.06     2.43 54447399     0.00     0.00  convoi_t::step()
  0.76    226.31     2.25 156695448     0.00     0.00  float32e8_t::operator-(float32e8_t const&) const
  0.74    228.51     2.20 179226522     0.00     0.00  stadt_t::is_within_city_limits(koord) const
  0.70    230.58     2.07 223147350     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_besch_t const&, bool)
  0.69    232.63     2.05      210     0.01     0.01  path_explorer_t::compartment_t::step()
  0.68    234.64     2.01 29047823     0.00     0.00  vehikel_t::calc_bild()
  0.65    236.56     1.92 41430728     0.00     0.00  haltestelle_t::get_halt(karte_t const*, koord3d, spieler_t const*)
  0.64    238.45     1.90 240601113     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  0.62    240.28     1.82 53611754     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, unsigned char) const
  0.62    242.09     1.82 17484496     0.00     0.00  vehikel_besch_t::get_bild_nr(unsigned char, ware_besch_t const*, char const*) const
  0.61    243.90     1.80 50784979     0.00     0.00  convoi_t::sync_step(long)
  0.56    245.54     1.64 29335307     0.00     0.00  vehikel_t::calc_speed_limit(weg_t const*, weg_t const*, fixed_list_tpl<short, 16>*, unsigned char, unsigned char)
  0.49    246.98     1.44  2427702     0.00     0.00  float32e8_t::exp2() const
  0.48    248.40     1.42 35030335     0.00     0.00  grund_t::get_weg_ribi_unmasked(waytype_t) const
  0.45    249.73     1.33 593188022     0.00     0.00  float32e8_t::to_sint32() const
  0.41    250.95     1.22  3310550     0.00     0.00  stadt_t::get_zufallspunkt(unsigned int, unsigned int, koord) const
  0.39    252.11     1.16  2427702     0.00     0.00  float32e8_t::log2() const
  0.38    253.22     1.11  1273999     0.00     0.00  haltestelle_t::vereinige_waren(ware_t const&)
  0.37    254.31     1.08 25442093     0.00     0.00  vehikel_t::hop_check()
  0.34    255.30     0.99  6831945     0.00     0.00  stadt_t::add_target_attraction(gebaeude_t*)
  0.33    256.27     0.97 10068687     0.00     0.00  stadt_t::step(long)
  0.31    257.20     0.93 42168017     0.00     0.00  existing_convoy_t::update_adverse_summary(adverse_summary_t&)
  0.31    258.12     0.91 52556209     0.00     0.00  convoy_t::calc_min_braking_distance(weight_summary_t const&, float32e8_t const&)
  0.30    259.01     0.90 67938088     0.00     0.00  marker_t::ist_markiert(grund_t const*) const
  0.28    259.83     0.81  1311548     0.00     0.00  stadt_t::step_passagiere()
  0.26    260.61     0.78  4587968     0.00     0.00  karte_t::lookup(koord3d) const
  0.26    261.39     0.78  1725984     0.00     0.00  sparse_tpl<unsigned char>::set_unsafe(koord, unsigned char)
  0.26    262.16     0.77 428196680     0.00     0.00  schiene_t::get_waytype() const
  0.26    262.93     0.77 27953075     0.00     0.00  dingliste_t::remove(ding_t const*)
  0.24    263.65     0.72 31140717     0.00     0.00  vehikel_basis_t::calc_height()
  0.24    264.37     0.72  3720888     0.00     0.00  waggon_t::ist_weg_frei(int&, bool)
  0.22    265.01     0.64 411233169     0.00     0.00  waggon_t::get_waytype() const
  0.21    265.64     0.63   379712     0.00     0.00  convoi_t::laden()
  0.21    266.25     0.61  9909793     0.00     0.00  grund_t::calc_back_bild(signed char, signed char)
  0.20    266.86     0.60 218212819     0.00     0.00  get_pair(int)
  0.20    267.44     0.58 26337003     0.00     0.00  haltestelle_t::get_preferred_line(quickstone_tpl<haltestelle_t>, unsigned char) const
  0.19    268.01     0.57 153795667     0.00     0.00  vehikel_besch_t::get_effective_force_index(int) const
  0.19    268.57     0.56 11370575     0.00     0.00  waggon_t::ist_befahrbar(grund_t const*) const
  0.19    269.13     0.56  1234498     0.00     0.00  automobil_t::ist_weg_frei(int&, bool)
  0.18    269.67     0.54 313698058     0.00     0.00  lazy_convoy_t::get_adverse_summary()
  0.18    270.19     0.52 130093452     0.00     0.00  grund_t::get_halt() const
  0.17    270.69     0.51 30490785     0.00     0.00  existing_convoy_t::get_force_summary(int)
  0.16    271.18     0.48 49037456     0.00     0.00  convoy_t::calc_min_braking_distance(float32e8_t const&, weight_summary_t const&, int)
  0.16    271.66     0.48 74420558     0.00     0.00  simrand(unsigned int, char const*)
  0.16    272.14     0.48  1879975     0.00     0.00  senke_t::step(long)
  0.15    272.58     0.44  4723727     0.00     0.00  grund_t::get_weg(waytype_t) const
  0.14    272.98     0.40 17426251     0.00     0.00  vehikel_t::check_access(weg_t const*) const
  0.13    273.37     0.39  1607287     0.00     0.00  vehikel_t::unload_freight(quickstone_tpl<haltestelle_t>)
  0.13    273.75     0.38 196354060     0.00     0.00  vehikel_t::update_bookkeeping(unsigned int)
  0.13    274.13     0.38 24819419     0.00     0.00  waggon_t::betrete_feld()
  0.13    274.50     0.37 26528509     0.00     0.00  vehikel_basis_t::betrete_feld()
  0.13    274.87     0.37   275323     0.00     0.00  karte_t::get_city(koord) const
  0.12    275.21     0.34  4420411     0.00     0.00  stadtauto_t::hop_check()
  0.11    275.55     0.34 41471049     0.00     0.00  haltestelle_t::check_access(spieler_t const*) const
  0.10    275.84     0.29 26544757     0.00     0.00  vehikel_basis_t::verlasse_feld()
  0.09    276.12     0.28   556565     0.00     0.00  haltestelle_t::update_alternative_seats(quickstone_tpl<convoi_t>)
  0.09    276.40     0.28                             BZ2_bzRead@16
  0.09    276.68     0.28                             __divdi3
  0.09    276.95     0.27 32735185     0.00     0.00  vehikel_t::rauche() const
  0.09    277.22     0.27     4144     0.00     0.00  karte_ansicht_t::display(bool)
  0.09    277.49     0.27 106970520     0.00     0.00  stadt_t::get_max_dimension()
  0.09    277.75     0.26 26514968     0.00     0.00  vehikel_basis_t::calc_set_richtung(koord, koord)
  0.09    278.00     0.26 14454950     0.00     0.00  freelist_t::gimme_node(unsigned int)
  0.09    278.26     0.26  2781199     0.00     0.00  vehikel_basis_t::no_cars_blocking(grund_t const*, convoi_t const*, unsigned char, unsigned char, unsigned char)
  0.08    278.50     0.24 155240323     0.00     0.00  grund_t::get_weg_hang() const
  0.08    278.75     0.24  4414320     0.00     0.00  dingliste_t::suche(ding_t::typ, unsigned char) const
  0.08    278.99     0.24  1865045     0.00     0.00  stadt_t::merke_passagier_ziel(koord, unsigned char)
  0.08    279.21     0.23 30962679     0.00     0.00  dingliste_t::add(ding_t*)
  0.08    279.44     0.23 12767970     0.00     0.00  convoi_t::book(long long, int)
  0.08    279.68     0.23    34963     0.00     0.00  image_reader_t::read_node(_iobuf*, obj_node_info_t&)
  0.07    279.89     0.22 14452658     0.00     0.00  marker_t::markiere(grund_t const*)
  0.07    280.12     0.22  2589718     0.00     0.00  signal_t::calc_bild()
  0.07    280.33     0.22   556565     0.00     0.00  convoi_t::hat_gehalten(quickstone_tpl<haltestelle_t>)
  0.07    280.56     0.22   455706     0.00     0.00  void weighted_vector_tpl<stadt_t::target_city_t>::insert_ordered<bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&)>(stadt_t::target_city_t const&, unsigned long, bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&), unsigned int)
  0.07    280.76     0.21  4871168     0.00     0.00  planquadrat_t::rdwr(karte_t*, loadsave_t*, koord)
  0.07    280.98     0.21  1115543     0.00     0.00  karte_t::sync_remove(sync_steppable*)
  0.07    281.19     0.21      684     0.00     0.00  karte_t::rem_stadt(stadt_t*)
  0.07    281.38     0.20 30490802     0.00     0.00  convoy_t::power_index_to_power(int, int)
  0.07    281.58     0.20  1635430     0.00     0.00  haltestelle_t::get_basis_pos() const
  0.07    281.79     0.20  1125723     0.00     0.00  fabrik_t::step(long)
  0.06    281.97     0.18 14180012     0.00     0.00  schiene_t::reserve(quickstone_tpl<convoi_t>, unsigned char)
  0.06    282.15     0.18   624823     0.00     0.00  convoi_t::calc_revenue(ware_t&)
  0.06    282.32     0.17 25255020     0.00     0.00  vehikel_t::calc_drag_coefficient(grund_t const*)
  0.06    282.50     0.17 84179690     0.00     0.00  strasse_t::get_waytype() const
  0.06    282.66     0.17  6079360     0.00     0.00  automobil_t::ist_befahrbar(grund_t const*) const
  0.05    282.82     0.16 63124554     0.00     0.00  convoy_t::get_braking_force(int)
  0.05    282.98     0.16  4435652     0.00     0.00  ding_t::~ding_t()
  0.05    283.14     0.16    96150     0.00     0.00  convoi_t::book_waiting_times()
  0.05    283.29     0.15 43060429     0.00     0.00  schedule_t::increment_index(unsigned char*, bool*) const
  0.05    283.44     0.15 24834388     0.00     0.00  waggon_t::verlasse_feld()
  0.05    283.59     0.15  1165125     0.00     0.00  path_explorer_t::compartment_t::get_path_between(quickstone_tpl<haltestelle_t>, quickstone_tpl<haltestelle_t>, unsigned short&, quickstone_tpl<haltestelle_t>&)
  0.05    283.74     0.15   859991     0.00     0.00  haltestelle_t::get_next_pos(koord) const
  0.05    283.88     0.14  3196688     0.00     0.00  vehikel_t::load_freight(quickstone_tpl<haltestelle_t>, bool)
  0.05    284.02     0.14 42647718     0.00     0.00  array_tpl<vehikel_t*>::operator[](unsigned int)
  0.05    284.17     0.14 31728731     0.00     0.00  vehikel_t::get_direction_degrees(unsigned char) const
  0.05    284.30     0.14 25947384     0.00     0.00  loadsave_t::lsgetc()
  0.04    284.43     0.13 91026033     0.00     0.00  ding_t::get_besitzer() const
  0.04    284.56     0.13 82869230     0.00     0.00  boden_t::get_typ() const
  0.04    284.69     0.13 46007253     0.00     0.00  loadsave_t::read(void*, unsigned int)
  0.04    284.82     0.13  4383972     0.00     0.00  wasser_t::calc_bild_internal()
  0.04    284.94     0.12 73733416     0.00     0.00  simrand_plain()
  0.04    285.06     0.12 28234825     0.00     0.00  zugfahrplan_t::get_waytype() const
  0.04    285.18     0.12  3276131     0.00     0.00  haltestelle_t::get_ware_summe(ware_besch_t const*) const
  0.04    285.30     0.12  1346429     0.00     0.00  grund_t::display_dinge_all(short, short, short, bool) const
  0.04    285.42     0.12  1125723     0.00     0.00  fabrik_t::book_weighted_sums(long long)
  0.04    285.53     0.11 14355533     0.00     0.00  get_next_dirs(koord, koord)
  0.04    285.64     0.11   260893     0.00     0.00  display_text_proportional_len_clip(short, short, char const*, int, unsigned short, long)
  0.04    285.75     0.11      675     0.00     0.00  stadt_t::update_target_cities()
  0.04    285.86     0.11                             MTgenerate()
  0.04    285.97     0.11                             myfeof
  0.04    286.07     0.10 38276743     0.00     0.00  convoi_t::get_pos() const
  0.03    286.18     0.10 28803079     0.00     0.00  ribi_typ(koord)
  0.03    286.27     0.10 25388040     0.00     0.00  vehikel_t::verlasse_feld()
  0.03    286.38     0.10  1884267     0.00     0.00  hashtable_tpl<id_pair, average_tpl<unsigned short>, koordhash_tpl<id_pair> >::is_contained(id_pair) const
  0.03    286.48     0.10   357239     0.00     0.00  verkehrsteilnehmer_t::hop()
  0.03    286.57     0.10        2     0.05     2.88  karte_t::laden(loadsave_t*)
  0.03    286.67     0.10 32880670     0.00     0.00  fussgaenger_t::sync_step(long)
  0.03    286.76     0.10 20132748     0.00     0.00  karte_t::ticks_to_tenths_of_minutes(long long) const
  0.03    286.86     0.10                             operator<<(std::ostream&, float32e8_t const&)
  0.03    286.95     0.09 10713616     0.00     0.00  stadtauto_t::sync_step(long)
  0.03    287.04     0.09  5943545     0.00     0.00  spieler_t::buche(long long, player_cost)
  0.03    287.13     0.09   839966     0.00     0.00  planquadrat_t::is_connected(quickstone_tpl<haltestelle_t>) const
  0.03    287.22     0.09   781999     0.00     0.00  stadtauto_t::calc_current_speed()
  0.03    287.31     0.09    14959     0.00     0.02  karte_t::step()
  0.03    287.40     0.09     1918     0.00     0.00  haltestelle_t::laden_abschliessen(bool)
  0.03    287.49     0.09                             is_in_list(vector_tpl<route_t::ANode*> const&, grund_t const*)
  0.03    287.57     0.09                             global constructors keyed to _ZlsRSoRK11float32e8_t
  0.03    287.65     0.08 53122578     0.00     0.00  wasser_t::ist_wasser() const
  0.03    287.74     0.08  5480490     0.00     0.00  ding_t::mark_image_dirty(unsigned short, short) const
  0.03    287.81     0.08  2423158     0.00     0.00  baum_t::rdwr(loadsave_t*)
  0.03    287.89     0.08  1709210     0.00     0.00  fabrik_t::produktion(unsigned int, long) const
  0.03    287.98     0.08    10298     0.00     0.00  display_flush_buffer()
  0.03    288.06     0.08                             __cxxabiv1::__si_class_type_info::__do_dyncast(int, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const
  0.03    288.13     0.08                             adler32
  0.03    288.21     0.07    97136     0.00     0.00  convoi_t::vorfahren()
  0.02    288.28     0.07 29063745     0.00     0.00  vehikel_t::get_direction_of_travel()
  0.02    288.35     0.07 24212640     0.00     0.00  ribi_typ(koord, koord)
  0.02    288.42     0.07  1869457     0.00     0.00  stadt_t::get_electricity_consumption(int) const
  0.02    288.49     0.07  1523042     0.00     0.00  haltestelle_t::find_route(minivec_tpl<quickstone_tpl<haltestelle_t> >*, ware_t&, unsigned short)
  0.02    288.56     0.07  1071007     0.00     0.00  fussgaenger_t::erzeuge_fussgaenger_an(karte_t*, koord3d, int&)
  0.02    288.63     0.07   948573     0.00     0.00  hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::is_contained(unsigned short) const
  0.02    288.70     0.07   655501     0.00     0.00  haltestelle_t::add_ware_to_halt(ware_t, bool)
  0.02    288.77     0.07   367038     0.00     0.00  weg_t::~weg_t()
  0.02    288.84     0.07    77975     0.00     0.00  waggon_t::is_weg_frei_choose_signal(signal_t*, unsigned short, int&)
  0.02    288.91     0.07     1950     0.00     0.00  haltestelle_t::~haltestelle_t()
  0.02    288.98     0.07      684     0.00     0.00  stadt_t::rdwr(loadsave_t*)
  0.02    289.05     0.07      684     0.00     0.00  stadt_t::~stadt_t()
  0.02    289.11     0.06 66232616     0.00     0.00  wasser_t::get_weg_ribi_unmasked(waytype_t) const
  0.02    289.17     0.06 43313726     0.00     0.00  verkehrsteilnehmer_t::update_bookkeeping(unsigned int)
  0.02    289.23     0.06 33181356     0.00     0.00  schiff_t::ist_befahrbar(grund_t const*) const
  0.02    289.29     0.06 32847985     0.00     0.00  automobil_t::get_waytype() const
  0.02    289.35     0.06 26964567     0.00     0.00  convoi_t::get_waiting_minutes(unsigned int)
  0.02    289.41     0.06 25779917     0.00     0.00  loadsave_t::rdwr_byte(signed char&)
  0.02    289.47     0.06 17635711     0.00     0.00  loadsave_t::end_tag(char const*)
  0.02    289.53     0.06 14425220     0.00     0.00  freelist_t::putback_node(unsigned int, void*)
  0.02    289.59     0.06  4845017     0.00     0.00  void templated_pixcopy<(pixcopy_routines)0>(unsigned short*, unsigned short const*, unsigned short const*)
  0.02    289.65     0.06  3213868     0.00     0.00  vehikel_t::get_fracht_gewicht() const
  0.02    289.70     0.05 25371792     0.00     0.00  vehikel_t::betrete_feld()
  0.02    289.75     0.05  9247998     0.00     0.00  tunnelboden_t::get_weg_hang() const
  0.02    289.80     0.05  4888923     0.00     0.00  dingliste_t::check_season(long)
  0.02    289.85     0.05  4850248     0.00     0.00  display_mark_img_dirty(unsigned int, short, short)
  0.02    289.90     0.05  4818880     0.00     0.00  baum_t::calc_bild()
  0.02    289.95     0.05  4046012     0.00     0.00  vehikel_basis_t::get_tile_steps(koord const&, koord const&, unsigned char&) const
  0.02    290.00     0.05  2103490     0.00     0.00  waggon_t::is_weg_frei_signal(unsigned short, int&)
  0.02    290.05     0.05  1897997     0.00     0.00  ding_t::display(int, int) const
  0.02    290.10     0.05   829717     0.00     0.00  stadtauto_t::ist_weg_frei(grund_t*)
  0.02    290.15     0.05   634055     0.00     0.00  haltestelle_t::liefere_an(ware_t)
  0.02    290.20     0.05   135922     0.00     0.00  route_t::insert(koord3d)
  0.02    290.25     0.05    97136     0.00     0.00  convoi_t::can_go_alte_richtung()
  0.02    290.30     0.05    10225     0.00     0.00  karte_t::remove_ausflugsziel(gebaeude_t*)
  0.02    290.35     0.05        2     0.03     1.32  modal_dialogue(gui_frame_t*, long, karte_t*, bool (*)())
  0.02    290.40     0.05                             display_fb_internal(short, short, short, short, int, bool, short, short, short, short)
  0.02    290.45     0.05                             create_textured_tile_mix(bild_besch_t const*, unsigned char, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*)
  0.02    290.50     0.04 13581007     0.00     0.00  interrupt_check(char const*)
  0.02    290.54     0.04  4905618     0.00     0.00  dingliste_t::rdwr(karte_t*, loadsave_t*, koord3d)
  0.02    290.58     0.04  1065424     0.00     0.00  grund_t::display_boden(short, short, short) const
  0.02    290.63     0.04                             potential_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  0.01    290.67     0.04 28944366     0.00     0.00  wolke_t::sync_step(long)
  0.01    290.71     0.04 18739483     0.00     0.00  vehikel_t::get_ribi(grund_t const*) const
  0.01    290.75     0.04 11346695     0.00     0.00  loadsave_t::rdwr_byte(unsigned char&)
  0.01    290.79     0.04 11221869     0.00     0.00  baum_t::get_typ() const
  0.01    290.83     0.04 10464109     0.00     0.00  grund_t::get_weg_ribi(waytype_t) const
  0.01    290.87     0.04  5193725     0.00     0.00  boden_t::calc_bild_internal()
  0.01    290.91     0.04  5051324     0.00     0.00  grund_t::grund_t(karte_t*, koord3d)
  0.01    290.95     0.04  4950877     0.00     0.00  mark_rect_dirty_wc(short, short, short, short)
  0.01    290.99     0.04  3383385     0.00     0.00  schiene_t::unreserve(vehikel_t*)
  0.01    291.03     0.04  3009401     0.00     0.00  local_delete_object(ding_t*, spieler_t*)
  0.01    291.07     0.04  2533533     0.00     0.00  automobil_t::get_typ() const
  0.01    291.11     0.04  1346429     0.00     0.00  dingliste_t::display_dinge_fg(short, short, unsigned char, bool) const
  0.01    291.15     0.04  1108125     0.00     0.00  wolke_t::wolke_t(karte_t*, koord3d, signed char, signed char, skin_besch_t const*)
  0.01    291.19     0.04  1028532     0.00     0.00  stadt_t::set_private_car_trip(int, stadt_t*)
  0.01    291.23     0.04   799478     0.00     0.00  stadtauto_t::betrete_feld()
  0.01    291.27     0.04   603935     0.00     0.00  convoi_t::get_comfort() const
  0.01    291.31     0.04   535847     0.00     0.00  fussgaenger_t::calc_bild()
  0.01    291.35     0.04   379712     0.00     0.00  haltestelle_t::request_loading(quickstone_tpl<convoi_t>)
  0.01    291.39     0.04   312947     0.00     0.00  gebaeude_t::get_bild() const
  0.01    291.43     0.04   170550     0.00     0.00  planquadrat_t::remove_from_haltlist(karte_t*, quickstone_tpl<haltestelle_t>)
  0.01    291.47     0.04    20280     0.00     0.00  register_image(bild_t*)
  0.01    291.51     0.04    15614     0.00     0.00  route_t::find_route(karte_t*, koord3d, fahrer_t*, unsigned int, unsigned char, unsigned int, unsigned int)
  0.01    291.55     0.04                             potential_convoy_t::update_freight_summary(freight_summary_t&)
  0.01    291.59     0.04                             non-virtual thunk to schiff_t::ist_befahrbar(grund_t const*) const
  0.01    291.63     0.04                             __dynamic_cast
  0.01    291.67     0.04  9421625     0.00     0.00  ribi_t::ist_exakt_orthogonal(unsigned char, unsigned char)
  0.01    291.70     0.04  8512419     0.00     0.00  vehikel_t::compare_directions(short, short) const
  0.01    291.73     0.03 58626671     0.00     0.00  vehikel_basis_t::get_bild() const
  0.01    291.76     0.03 25799296     0.00     0.00  waggon_t::get_typ() const
  0.01    291.79     0.03 25389474     0.00     0.00  grund_t::get_weg_yoff() const
  0.01    291.82     0.03  9895181     0.00     0.00  win_get_magic(long)
  0.01    291.85     0.03  6195204     0.00     0.00  senke_t::get_power_load() const
  0.01    291.88     0.03  5538856     0.00     0.00  convoi_t::add_running_cost(long long, weg_t const*)
  0.01    291.91     0.03  5045208     0.00     0.00  monorailboden_t::get_typ() const
  0.01    291.94     0.03  4582063     0.00     0.00  brueckenboden_t::get_typ() const
  0.01    291.97     0.03  4435871     0.00     0.00  ding_t::init(karte_t*)
  0.01    292.00     0.03  4227214     0.00     0.00  brueckenboden_t::get_weg_hang() const
  0.01    292.03     0.03  2521348     0.00     0.00  boden_t::boden_t(karte_t*, loadsave_t*, koord)
  0.01    292.06     0.03  2423158     0.00     0.00  baum_t::laden_abschliessen()
  0.01    292.09     0.03  2423158     0.00     0.00  baum_t::calc_off(unsigned char, signed char, signed char)
  0.01    292.12     0.03  1810952     0.00     0.00  gebaeude_t::get_typ() const
  0.01    292.15     0.03  1267953     0.00     0.00  karte_t::sync_add(sync_steppable*)
  0.01    292.18     0.03  1073269     0.00     0.00  convoi_t::get_catering_level(unsigned char) const
  0.01    292.21     0.03   985008     0.00     0.00  stadt_t::get_private_car_ownership(int)
  0.01    292.24     0.03   936512     0.00     0.00  planquadrat_t::add_to_haltlist(quickstone_tpl<haltestelle_t>)
  0.01    292.27     0.03   896410     0.00     0.00  display_color_img(unsigned int, short, short, signed char, int, int)
  0.01    292.30     0.03   293061     0.00     0.00  convoi_t::can_overtake(overtaker_t*, int, short)
  0.01    292.33     0.03   172087     0.00     0.00  hausbauer_t::find_tile(char const*, int)
  0.01    292.36     0.03   142103     0.00     0.00  karte_t::recalc_natural_slope(koord, signed char&) const
  0.01    292.39     0.03   119414     0.00     0.00  pumpe_t::step(long)
  0.01    292.42     0.03     1918     0.00     0.00  haltestelle_t::haltestelle_t(karte_t*, loadsave_t*)
  0.01    292.45     0.03     1150     0.00     0.00  vehikel_besch_t::loaded()
  0.01    292.48     0.03                             fill_event(event_t*)
  0.01    292.51     0.03                             std::type_info::operator==(std::type_info const&) const
  0.01    292.54     0.03                             non-virtual thunk to automobil_t::ist_befahrbar(grund_t const*) const
  0.01    292.56     0.03 10566761     0.00     0.00  ribi_typ(koord3d, koord3d)
  0.01    292.59     0.03  3196688     0.00     0.00  vehikel_t::beladen(quickstone_tpl<haltestelle_t>, bool)
  0.01    292.62     0.03       17     0.00     0.00  existing_convoy_t::get_power_summary(int)
  0.01    292.63     0.02 25319458     0.00     0.00  get_friction_of_waytype(waytype_t)
  0.01    292.65     0.02 12750818     0.00     0.00  simline_t::convoi_to_line_catgory(unsigned char)
  0.01    292.68     0.02 10566761     0.00     0.00  ribi_typ(koord3d)
  0.01    292.69     0.02  9506205     0.00     0.00  destroy_win(long)
  0.01    292.71     0.02  6573385     0.00     0.00  grund_t::get_back_bild(int) const
  0.01    292.74     0.02  5089460     0.00     0.00  dingliste_t::calc_bild()
  0.01    292.75     0.02  5056540     0.00     0.00  grund_t::set_text(char const*)
  0.01    292.77     0.02  4871168     0.00     0.00  planquadrat_t::~planquadrat_t()
  0.01    292.80     0.02  4312671     0.00     0.00  grund_t::ist_wasser() const
  0.01    292.81     0.02  3730126     0.00     0.00  waggon_t::get_kosten(grund_t const*, int, koord) const
  0.01    292.83     0.02  3556318     0.00     0.00  dingliste_t::display_dinge_vh(short, short, unsigned char, unsigned char, bool) const
  0.01    292.86     0.02  3025122     0.00     0.00  automobil_t::get_kosten(grund_t const*, int, koord) const
  0.01    292.88     0.02  2423158     0.00     0.00  baum_t::baum_t(karte_t*, loadsave_t*)
  0.01    292.89     0.02  2197252     0.00     0.00  grund_t::sort_trees()
  0.01    292.92     0.02  2016651     0.00     0.00  dingliste_t::display_dinge_bg(short, short, unsigned char) const
  0.01    292.94     0.02  1895356     0.00     0.00  senke_t::sync_step(long)
  0.01    292.95     0.02  1884171     0.00     0.00  hashtable_tpl<id_pair, average_tpl<unsigned short>, koordhash_tpl<id_pair> >::access(id_pair)
  0.01    292.98     0.02  1821532     0.00     0.00  stadt_t::get_power_demand() const
  0.01    293.00     0.02  1365537     0.00     0.00  autofahrplan_t::get_waytype() const
  0.01    293.01     0.02  1190877     0.00     0.00  fabrik_t::get_fab(karte_t const*, koord)
  0.01    293.04     0.02  1108125     0.00     0.00  wolke_t::~wolke_t()
  0.01    293.06     0.02  1042036     0.00     0.00  haltestelle_t::book(long long, int)
  0.01    293.07     0.02  1040564     0.00     0.00  hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::get(unsigned short) const
  0.01    293.10     0.02   807610     0.00     0.00  schedule_t::get_current_eintrag() const
  0.01    293.12     0.02   802335     0.00     0.00  stadtauto_t::calc_bild()
  0.01    293.13     0.02   799478     0.00     0.00  stadtauto_t::hop()
  0.01    293.15     0.02   701355     0.00     0.00  vehikel_t::is_stuck()
  0.01    293.18     0.02   585900     0.00     0.00  convoi_t::set_next_stop_index(unsigned short)
  0.01    293.19     0.02   560308     0.00     0.00  convoi_t::calc_heaviest_vehicle()
  0.01    293.21     0.02   484756     0.00     0.00  automobil_t::betrete_feld()
  0.01    293.24     0.02   452621     0.00     0.00  haus_tile_besch_t::get_offset() const
  0.01    293.25     0.02   451619     0.00     0.00  tramfahrplan_t::get_waytype() const
  0.01    293.27     0.02   307004     0.00     0.00  convoi_t::get_length() const
  0.01    293.30     0.02   291291     0.00     0.00  convoi_t::get_vehikel(unsigned short) const
  0.01    293.31     0.02   235928     0.00     0.00  wayobj_t::get_after_bild() const
  0.01    293.33     0.02   173230     0.00     0.00  ware_t::rdwr(karte_t*, loadsave_t*)
  0.01    293.36     0.02   142235     0.00     0.00  verkehrsteilnehmer_t::get_waytype() const
  0.01    293.38     0.02   131310     0.00     0.00  fussgaenger_besch_t const* const& pick_any_weighted<fussgaenger_besch_t const*, weighted_vector_tpl>(weighted_vector_tpl<fussgaenger_besch_t const*> const&)
  0.01    293.39     0.02   111136     0.00     0.00  fabrik_t::recalc_factory_status()
  0.01    293.42     0.02    97145     0.00     0.00  marker_t::unmarkiere_alle()
  0.01    293.44     0.02    97141     0.00     0.00  route_t::calc_route(karte_t*, koord3d, koord3d, fahrer_t*, int, unsigned int, int, unsigned int)
  0.01    293.45     0.02    16431     0.00     0.00  GetEventsNoWait()
  0.01    293.48     0.02    12346     0.00     0.00  karte_t::interactive_event(event_t&)
  0.01    293.50     0.02    10298     0.00     0.00  dr_prepare_flush()
  0.01    293.51     0.02    10225     0.00     0.00  karte_t::add_ausflugsziel(gebaeude_t*)
  0.01    293.54     0.02      629     0.00     0.00  stadt_t::baue(bool)
  0.01    293.56     0.02       57     0.00     0.00  non-virtual thunk to fussgaenger_t::sync_step(long)
  0.01    293.57     0.02        2     0.01     0.01  karte_t::init_felder()
  0.01    293.60     0.02        1     0.02   274.03  karte_t::interactive(unsigned int)
  0.01    293.62     0.02                             process_kill_list()
  0.01    293.63     0.02                             recode_normal_img(unsigned int)
  0.01    293.65     0.02                             __cxxabiv1::__class_type_info::__do_dyncast(int, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const
  0.01    293.68     0.02                             non-virtual thunk to wolke_t::sync_step(long)
  0.01    293.69     0.02                             non-virtual thunk to stadtauto_t::sync_step(long)
  0.01    293.71     0.02                             non-virtual thunk to waggon_t::get_kosten(grund_t const*, int, koord) const
  0.01    293.74     0.02                             non-virtual thunk to vehikel_t::get_ribi(grund_t const*) const
  0.01    293.75     0.02                             operator delete(void*)
  0.01    293.77     0.02                             crc32
  0.01    293.79     0.01  7182880     0.00     0.00  schiene_t::unreserve(quickstone_tpl<convoi_t>)
  0.01    293.81     0.01  6930728     0.00     0.00  vehikel_basis_t::calc_richtung(koord, koord)
  0.01    293.82     0.01  2226479     0.00     0.00  ware_t::ware_t()
  0.01    293.83     0.01   325853     0.00     0.00  vehikel_t::neue_fahrt(unsigned short, bool)
  0.01    293.85     0.01   154853     0.00     0.00  verkehrsteilnehmer_t::~verkehrsteilnehmer_t()
  0.01    293.87     0.01    89358     0.00     0.00  haltestelle_t::get_average_waiting_time(quickstone_tpl<haltestelle_t>, unsigned char) const
  0.01    293.88     0.01    74691     0.00     0.00  crossing_logic_t::release_crossing(vehikel_basis_t const*)
  0.01    293.89     0.01    37461     0.00     0.00  crossing_logic_t::request_crossing(vehikel_basis_t const*)
  0.01    293.91     0.01    16396     0.00     0.00  win_poll_event(event_t*)
  0.01    293.93     0.01      112     0.00     0.00  grund_t::neuen_weg_bauen(weg_t*, unsigned char, spieler_t*)
  0.01    293.94     0.01                             non-virtual thunk to waggon_t::ist_befahrbar(grund_t const*) const
  0.00    293.95     0.01 21341692     0.00     0.00  weg_t::get_typ() const
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Dwachs

Imho the most potential for optimization is in the citycar's destructor. You have to speed-up those remove operations. Use an ordered list here. Order them by age (then by destination or just by comparing the pointers). If ordered by age, then the cities can kill the oldest cars very fast (they are always on top of the list).

How many citycars do you have in such a list in the profiled game?
Parsley, sage, rosemary, and maggikraut.

jamespetts

Hmm - this is odd. Loading the game and putting a breakpoint in the stadtauto_t::~stadtauto_t() method to check the number of cars in the list suggests that the problem might be rather elusive: the breakpoint is not hit, but the game is unresponsive to the extent of taking dozens or even scores of seconds between each screen refresh.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

did you declare ~stadtauto_t and ~verkehrsteilnehmer_t virtual.

jamespetts

#27
Ahh, no, I didn't. Thank you for that - I shall have another go. Incidentally, to answer Dwachs' original question, the number of cars in one randomly selected list appears to be: 387,469.

Edit: Just checked - ~stadtauto_t and ~verkehrsteilnehmer_t were already declared as virtual.

Edit 2: If this is significant, I also notice that performance seems to worsen considerably in the few dozen seconds after loading.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Dwachs

only the destructor of the base class needs to be declared, which should be the case already.

Quote from: jamespetts on April 15, 2012, 07:30:57 PM
Ahh, no, I didn't. Thank you for that - I shall have another go. Incidentally, to answer Dwachs' original question, the number of cars in one randomly selected list appears to be: 387,469.
There are more than 300k cars in one list? That is much! That cries for an ordered list ;) or something related (binary tree whatever) Just do not use single linked lists.
Parsley, sage, rosemary, and maggikraut.

jamespetts

Hmm, an ordered list? I shall have to look into that. Thank you for the tip.

Incidentally, here is a profile of the server game as it was in 1970, when there were far fewer private cars. This is with the freelist enabled for stadtauto_t:


Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
time   seconds   seconds    calls   s/call   s/call  name   
10.91     50.99    50.99    19252     0.00     0.00  karte_t::sync_step(long, bool, bool)
10.08     98.11    47.12 216101546     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_t const&)
  7.81    134.59    36.49  3489993     0.00     0.00  haltestelle_t::hole_ab(ware_besch_t const*, unsigned int, schedule_t const*, spieler_t const*, convoi_t*, bool)
  5.39    159.78    25.18 89792165     0.00     0.00  stadtauto_t::hop_check()
  3.75    177.32    17.54 1709968392     0.00     0.00  float32e8_t::operator*(float32e8_t const&) const
  3.51    193.73    16.41 38947894     0.00     0.00  convoi_t::increment_odometer(unsigned int)
  3.02    207.84    14.11 294659028     0.00     0.00  grund_t::get_weg_ribi_unmasked(waytype_t) const
  2.96    221.69    13.85 1205459610     0.00     0.00  float32e8_t::operator+(float32e8_t const&) const
  2.59    233.78    12.10 39748253     0.00     0.00  convoi_t::calc_acceleration(long)
  2.44    245.17    11.38 183106668     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, unsigned char) const
  2.44    256.55    11.38 1650104825     0.00     0.00  ild(unsigned int)
  2.04    266.08     9.54 935064899     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  1.89    274.92     8.84 43135008     0.00     0.00  existing_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  1.72    282.96     8.04 1896074488     0.00     0.00  float32e8_t::set_value(unsigned int)
  1.54    290.17     7.21 111265589     0.00     0.00  vehikel_basis_t::no_cars_blocking(grund_t const*, convoi_t const*, unsigned char, unsigned char, unsigned char)
  1.36    296.52     6.35    95310     0.00     0.00  route_t::intern_calc_route(karte_t*, koord3d, koord3d, fahrer_t*, int, unsigned int, unsigned int)
  1.34    302.76     6.24                             __udivdi3
  1.23    308.51     5.75  3789514     0.00     0.00  stadt_t::find_destination(stadt_t::factory_set_t&, long long, stadt_t::pax_return_type*, unsigned int, unsigned int, koord)
  1.22    314.19     5.68 1057129187     0.00     0.00  stadtauto_t::sync_step(long)
  1.19    319.76     5.57  3606129     0.00     0.00  display_img_aux(unsigned int, short, short, signed char, int, int)
  1.05    324.67     4.91                             BZ2_bzDecompress@4
  1.03    329.47     4.80 85214746     0.00     0.00  stadtauto_t::ist_weg_frei(grund_t*)
  0.97    334.00     4.53 94030576     0.00     0.00  vehikel_basis_t::calc_height()
  0.91    338.23     4.23 39748253     0.00     0.00  convoy_t::calc_move(long, float32e8_t const&, weight_summary_t const&, int, int, int, int, int&, int&, float32e8_t&)
  0.89    342.38     4.16                             BZ2_decompress
  0.85    346.37     3.98 70158213     0.00     0.00  dingliste_t::remove(ding_t const*)
  0.81    350.13     3.77  2297558     0.00     0.00  haltestelle_t::vereinige_waren(ware_t const&)
  0.77    353.74     3.60 65571324     0.00     0.00  existing_convoy_t::get_brake_summary(int)
  0.75    357.26     3.52 603813301     0.00     0.00  float32e8_t::operator/(float32e8_t const&) const
  0.70    360.55     3.29 68919796     0.00     0.00  vehikel_basis_t::verlasse_feld()
  0.70    363.81     3.27 1810944473     0.00     0.00  float32e8_t::set_value(int)
  0.70    367.08     3.27 22052807     0.00     0.00  gebaeude_t* const& pick_any_weighted<gebaeude_t*, weighted_vector_tpl>(weighted_vector_tpl<gebaeude_t*> const&)
  0.66    370.18     3.09 24004966     0.00     0.00  vehikel_t::hop()
  0.65    373.20     3.03 269807769     0.00     0.00  stadt_t::is_within_city_limits(koord) const
  0.60    376.01     2.81  2228080     0.00     0.00  waggon_t::block_reserver(route_t*, unsigned short, unsigned short&, unsigned short&, int, bool, bool) const
  0.60    378.81     2.80 69011819     0.00     0.00  dingliste_t::intern_add_moving(ding_t*)
  0.59    381.58     2.77 216101546     0.00     0.00  weight_summary_t::add_weight(int, int)
  0.55    384.13     2.55 43400766     0.00     0.00  stadtauto_t::calc_current_speed()
  0.54    386.67     2.53 56497666     0.00     0.00  convoi_t::step()
  0.52    389.08     2.42      217     0.01     0.01  path_explorer_t::compartment_t::step()
  0.49    391.39     2.31 52704613     0.00     0.00  convoi_t::sync_step(long)
  0.47    393.58     2.19 27378999     0.00     0.00  vehikel_t::calc_bild()
  0.46    395.72     2.13 149785349     0.00     0.00  float32e8_t::operator-(float32e8_t const&) const
  0.43    397.71     1.99 43135008     0.00     0.00  existing_convoy_t::update_weight_summary(weight_summary_t&)
  0.42    399.67     1.96 216101546     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_besch_t const&, bool)
  0.40    401.55     1.88 38227406     0.00     0.00  haltestelle_t::get_halt(karte_t const*, koord3d, spieler_t const*)
  0.39    403.37     1.82 44768594     0.00     0.00  stadtauto_t::calc_bild()
  0.31    404.81     1.44 600545718     0.00     0.00  float32e8_t::to_sint32() const
  0.29    406.16     1.35 27698602     0.00     0.00  vehikel_t::calc_speed_limit(weg_t const*, weg_t const*, fixed_list_tpl<short, 16>*, unsigned char, unsigned char)
  0.27    407.44     1.28  1201236     0.00     0.00  stadt_t::step_passagiere()
  0.26    408.67     1.23   129853     0.00     0.00  stadtauto_t::~stadtauto_t()
  0.26    409.88     1.22  2263625     0.00     0.00  float32e8_t::exp2() const
  0.24    411.03     1.15  2918115     0.00     0.00  stadt_t::get_zufallspunkt(unsigned int, unsigned int, koord) const
  0.24    412.13     1.10 798712948     0.00     0.00  strasse_t::get_waytype() const
  0.24    413.23     1.10  2263625     0.00     0.00  float32e8_t::log2() const
  0.22    414.28     1.05 198005426     0.00     0.00  vehikel_basis_t::calc_richtung(koord, koord)
  0.22    415.29     1.01 12670076     0.00     0.00  vehikel_besch_t::get_bild_nr(unsigned char, ware_besch_t const*, char const*) const
  0.21    416.29     1.00                             non-virtual thunk to stadtauto_t::sync_step(long)
  0.21    417.25     0.96  9469854     0.00     0.00  stadt_t::step(long)
  0.20    418.20     0.95 43135008     0.00     0.00  existing_convoy_t::update_adverse_summary(adverse_summary_t&)
  0.20    419.15     0.95  2090156     0.00     0.00  automobil_t::ist_weg_frei(int&, bool)
  0.20    420.11     0.95   847849     0.00     0.00  karte_t::sync_remove(sync_steppable*)
  0.20    421.04     0.93  6536295     0.00     0.00  stadt_t::add_target_attraction(gebaeude_t*)
  0.20    421.96     0.93 91406178     0.00     0.00  marker_t::ist_markiert(grund_t const*) const
  0.19    422.85     0.89 44474818     0.00     0.00  stadtauto_t::hop()
  0.18    423.71     0.86 43852350     0.00     0.00  haltestelle_t::get_preferred_line(quickstone_tpl<haltestelle_t>, unsigned char) const
  0.18    424.55     0.84 142646619     0.00     0.00  simrand(unsigned int, char const*)
  0.18    425.38     0.83 24172957     0.00     0.00  vehikel_t::hop_check()
  0.18    426.21     0.83 14757730     0.00     0.00  grund_t::calc_back_bild(signed char, signed char)
  0.17    427.00     0.78 742799385     0.00     0.00  verkehrsteilnehmer_t::update_bookkeeping(unsigned int)
  0.16    427.76     0.77 68889323     0.00     0.00  vehikel_basis_t::calc_set_richtung(koord, koord)
  0.16    428.52     0.76 68902838     0.00     0.00  vehikel_basis_t::betrete_feld()
  0.16    429.25     0.72 31678843     0.00     0.00  existing_convoy_t::get_force_summary(int)
  0.15    429.95     0.71 10473797     0.00     0.00  waggon_t::ist_befahrbar(grund_t const*) const
  0.15    430.65     0.70  4499957     0.00     0.00  karte_t::lookup(koord3d) const
  0.15    431.33     0.68 406484869     0.00     0.00  schiene_t::get_waytype() const
  0.14    432.00     0.67   334749     0.00     0.00  convoi_t::laden()
  0.14    432.67     0.66 55251409     0.00     0.00  convoy_t::calc_min_braking_distance(weight_summary_t const&, float32e8_t const&)
  0.14    433.32     0.66  3592477     0.00     0.00  waggon_t::ist_weg_frei(int&, bool)
  0.14    433.98     0.65   405634     0.00     0.00  karte_t::get_city(koord) const
  0.13    434.61     0.63 149441081     0.00     0.00  vehikel_besch_t::get_effective_force_index(int) const
  0.13    435.20     0.60 40093707     0.00     0.00  grund_t::get_weg(waytype_t) const
  0.13    435.80     0.59  1445970     0.00     0.00  vehikel_t::unload_freight(quickstone_tpl<haltestelle_t>)
  0.13    436.38     0.59     1980     0.00     0.00  haltestelle_t::laden_abschliessen(bool)
  0.12    436.96     0.58 44474818     0.00     0.00  stadtauto_t::betrete_feld()
  0.12    437.52     0.56 31677846     0.00     0.00  vehikel_t::check_access(weg_t const*) const
  0.12    438.06     0.54 76698933     0.00     0.00  koord3d const& pick_any_weighted<koord3d, weighted_vector_tpl>(weighted_vector_tpl<koord3d> const&)
  0.11    438.59     0.53      684     0.00     0.00  stadt_t::rdwr(loadsave_t*)
  0.11    439.12     0.53                             BZ2_bzRead@16
  0.11    439.64     0.52 120571732     0.00     0.00  grund_t::get_halt() const
  0.11    440.16     0.52 116518612     0.00     0.00  ribi_typ(koord, koord)
  0.11    440.67     0.51 309062567     0.00     0.00  lazy_convoy_t::get_adverse_summary()
  0.11    441.17     0.50 51864654     0.00     0.00  convoy_t::calc_min_braking_distance(float32e8_t const&, weight_summary_t const&, int)
  0.10    441.66     0.49 203471496     0.00     0.00  get_pair(int)
  0.10    442.14     0.48  1005464     0.00     0.00  sparse_tpl<unsigned char>::set_unsafe(koord, unsigned char)
  0.10    442.59     0.45 390428387     0.00     0.00  waggon_t::get_waytype() const
  0.10    443.04     0.45  1192868     0.00     0.00  senke_t::step(long)
  0.09    443.48     0.44 142259285     0.00     0.00  simrand_plain()
  0.09    443.91     0.43 121670048     0.00     0.00  ribi_typ(koord)
  0.09    444.32     0.41 475749778     0.00     0.00  grund_t::get_weg_hang() const
  0.08    444.68     0.36  2538572     0.00     0.00  signal_t::calc_bild()
  0.07    445.03     0.35   450527     0.00     0.00  convoi_t::hat_gehalten(quickstone_tpl<haltestelle_t>)
  0.07    445.38     0.35                             __divdi3
  0.07    445.71     0.34  6270398     0.00     0.00  dingliste_t::suche(ding_t::typ, unsigned char) const
  0.07    446.04     0.32 73041729     0.00     0.00  dingliste_t::add(ding_t*)
  0.07    446.35     0.31 277199626     0.00     0.00  stadtauto_t::get_typ() const
  0.07    446.65     0.30                             MTgenerate()
  0.06    446.95     0.30 189603666     0.00     0.00  vehikel_t::update_bookkeeping(unsigned int)
  0.06    447.25     0.29 66599501     0.00     0.00  loadsave_t::read(void*, unsigned int)
  0.06    447.54     0.29  1065190     0.00     0.00  convoi_t::calc_revenue(ware_t&)
  0.06    447.81     0.28 38383975     0.00     0.00  haltestelle_t::check_access(spieler_t const*) const
  0.06    448.10     0.28 31704916     0.00     0.00  vehikel_t::rauche() const
  0.06    448.37     0.27 104602480     0.00     0.00  ding_t::get_besitzer() const
  0.06    448.63     0.27 23306923     0.00     0.00  waggon_t::betrete_feld()
  0.06    448.90     0.27   999875     0.00     0.00  fabrik_t::step(long)
  0.06    449.17     0.26 92656708     0.00     0.00  stadt_t::get_max_dimension()
  0.06    449.43     0.26 13604416     0.00     0.00  schiene_t::reserve(quickstone_tpl<convoi_t>, unsigned char)
  0.05    449.68     0.25 21451445     0.00     0.00  marker_t::markiere(grund_t const*)
  0.05    449.92     0.24 21213870     0.00     0.00  automobil_t::ist_befahrbar(grund_t const*) const
  0.05    450.16     0.24   455706     0.00     0.00  void weighted_vector_tpl<stadt_t::target_city_t>::insert_ordered<bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&)>(stadt_t::target_city_t const&, unsigned long, bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&), unsigned int)
  0.05    450.39     0.23     5312     0.00     0.00  karte_ansicht_t::display(bool)
  0.05    450.61     0.22 215151536     0.00     0.00  boden_t::get_typ() const
  0.05    450.83     0.22 20914034     0.00     0.00  freelist_t::gimme_node(unsigned int)
  0.05    451.05     0.22  6574949     0.00     0.00  wasser_t::calc_bild_internal()
  0.05    451.27     0.22  1206268     0.00     0.00  stadt_t::check_road_connexion_to(stadt_t*)
  0.04    451.47     0.20  4407394     0.00     0.00  haltestelle_t::get_ware_summe(ware_besch_t const*) const
  0.04    451.67     0.20  2818696     0.00     0.00  haltestelle_t::get_basis_pos() const
  0.04    451.87     0.20  1832893     0.00     0.00  hashtable_tpl<id_pair, average_tpl<unsigned short>, koordhash_tpl<id_pair> >::is_contained(id_pair) const
  0.04    452.06     0.19 44525774     0.00     0.00  array_tpl<vehikel_t*>::operator[](unsigned int)
  0.04    452.25     0.19 14081282     0.00     0.00  road_destination_finder_t::ist_befahrbar(grund_t const*) const
  0.04    452.44     0.19   332295     0.00     0.00  stadt_t::check_road_connexion_to(gebaeude_t const*)
  0.04    452.63     0.19    94225     0.00     0.00  convoi_t::book_waiting_times()
  0.04    452.82     0.19      684     0.00     0.00  karte_t::rem_stadt(stadt_t*)
  0.04    453.01     0.19                             myfeof
  0.04    453.19     0.18 65571324     0.00     0.00  convoy_t::get_braking_force(int)
  0.04    453.37     0.18 29982993     0.00     0.00  vehikel_t::get_direction_degrees(unsigned char) const
  0.04    453.55     0.17  1136110     0.00     0.00  stadt_t::merke_passagier_ziel(koord, unsigned char)
  0.04    453.71     0.17  1166011     0.00     0.00  haltestelle_t::add_ware_to_halt(ware_t, bool)
  0.04    453.88     0.17 34807777     0.00     0.00  fussgaenger_t::sync_step(long)
  0.04    454.05     0.17 23800345     0.00     0.00  vehikel_t::calc_drag_coefficient(grund_t const*)
  0.03    454.20     0.16 27394246     0.00     0.00  vehikel_t::get_direction_of_travel()
  0.03    454.37     0.16  4871168     0.00     0.00  planquadrat_t::rdwr(karte_t*, loadsave_t*, koord)
  0.03    454.52     0.16  1498447     0.00     0.00  planquadrat_t::is_connected(quickstone_tpl<haltestelle_t>) const
  0.03    454.68     0.15 23322320     0.00     0.00  waggon_t::verlasse_feld()
  0.03    454.82     0.15 12177597     0.00     0.00  convoi_t::book(long long, int)
  0.03    454.98     0.15    14060     0.00     0.03  karte_t::step()
  0.03    455.12     0.14  1958612     0.00     0.00  path_explorer_t::compartment_t::get_path_between(quickstone_tpl<haltestelle_t>, quickstone_tpl<haltestelle_t>, unsigned short&, quickstone_tpl<haltestelle_t>&)
  0.03    455.25     0.14   379936     0.00     0.00  verkehrsteilnehmer_t::hop()
  0.03    455.38     0.13 45543382     0.00     0.00  automobil_t::get_waytype() const
  0.03    455.51     0.13 24065042     0.00     0.00  vehikel_t::verlasse_feld()
  0.03    455.64     0.13  1431130     0.00     0.00  grund_t::display_boden(short, short, short) const
  0.03    455.77     0.13    34963     0.00     0.00  image_reader_t::read_node(_iobuf*, obj_node_info_t&)
  0.03    455.90     0.13    11455     0.00     0.00  display_flush_buffer()
  0.03    456.04     0.13                             __cxxabiv1::__si_class_type_info::__do_dyncast(int, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const
  0.03    456.16     0.12  2086596     0.00     0.00  waggon_t::is_weg_frei_signal(unsigned short, int&)
  0.03    456.29     0.12                             operator<<(std::ostream&, float32e8_t const&)
  0.03    456.40     0.12 39132156     0.00     0.00  convoi_t::get_pos() const
  0.03    456.52     0.12 31678843     0.00     0.00  convoy_t::power_index_to_power(int, int)
  0.03    456.64     0.12 20749117     0.00     0.00  wolke_t::sync_step(long)
  0.03    456.76     0.12  3126356     0.00     0.00  schiene_t::unreserve(vehikel_t*)
  0.03    456.88     0.12        2     0.06     3.74  karte_t::laden(loadsave_t*)
  0.02    457.00     0.11 39320187     0.00     0.00  schedule_t::increment_index(unsigned char*, bool*) const
  0.02    457.11     0.11 34458411     0.00     0.00  schiff_t::ist_befahrbar(grund_t const*) const
  0.02    457.21     0.11 21356296     0.00     0.00  get_next_dirs(koord, koord)
  0.02    457.32     0.11 16132102     0.00     0.00  interrupt_check(char const*)
  0.02    457.44     0.11  4905303     0.00     0.00  grund_t::rdwr(loadsave_t*)
  0.02    457.55     0.11  2870125     0.00     0.00  vehikel_t::load_freight(quickstone_tpl<haltestelle_t>, bool)
  0.02    457.65     0.11   495250     0.00     0.00  display_text_proportional_len_clip(short, short, char const*, int, unsigned short, long)
  0.02    457.76     0.10 28688896     0.00     0.00  karte_t::ticks_to_tenths_of_minutes(long long) const
  0.02    457.86     0.10 25555825     0.00     0.00  vehikel_t::get_ribi(grund_t const*) const
  0.02    457.96     0.10  7739734     0.00     0.00  grund_besch_t::get_ground_tile(signed char, short)
  0.02    458.06     0.10  4141419     0.00     0.00  ding_t::~ding_t()
  0.02    458.16     0.10   578521     0.00     0.00  fussgaenger_t::calc_bild()
  0.02    458.26     0.10   450527     0.00     0.00  haltestelle_t::update_alternative_seats(quickstone_tpl<convoi_t>)
  0.02    458.36     0.10    82128     0.00     0.00  waggon_t::is_weg_frei_choose_signal(signal_t*, unsigned short, int&)
  0.02    458.46     0.10                             std::type_info::operator==(std::type_info const&) const
  0.02    458.56     0.10  9777216     0.00     0.00  dingliste_t::check_season(long)
  0.02    458.64     0.09 68783226     0.00     0.00  wasser_t::get_weg_ribi_unmasked(waytype_t) const
  0.02    458.74     0.09 26473509     0.00     0.00  zugfahrplan_t::get_waytype() const
  0.02    458.82     0.09 17081631     0.00     0.00  grund_t::get_weg_ribi(waytype_t) const
  0.02    458.92     0.09        1     0.09   438.11  karte_t::interactive(unsigned int)
  0.02    459.00     0.09                             display_fb_internal(short, short, short, short, int, bool, short, short, short, short)
  0.02    459.08     0.08 76773197     0.00     0.00  verkehrsteilnehmer_t::get_waytype() const
  0.02    459.17     0.08 44883411     0.00     0.00  convoi_t::get_waiting_minutes(unsigned int)
  0.02    459.25     0.08 12143562     0.00     0.00  brueckenboden_t::get_typ() const
  0.02    459.32     0.08  7051810     0.00     0.00  road_destination_finder_t::get_kosten(grund_t const*, int, koord) const
  0.02    459.40     0.08  2440449     0.00     0.00  void templated_pixcopy<(pixcopy_routines)0>(unsigned short*, unsigned short const*, unsigned short const*)
  0.02    459.49     0.08  1395121     0.00     0.00  haltestelle_t::build_destination_list(ware_t&)
  0.02    459.56     0.08   922770     0.00     0.00  hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::is_contained(unsigned short) const
  0.02    459.64     0.08   296465     0.00     0.00  verkehrsteilnehmer_t::~verkehrsteilnehmer_t()
  0.02    459.73     0.08   153999     0.00     0.00  stadt_t::remove_connected_attraction(gebaeude_t*)
  0.02    459.81     0.08    95183     0.00     0.00  convoi_t::can_go_alte_richtung()
  0.02    459.88     0.08     2012     0.00     0.00  haltestelle_t::~haltestelle_t()
  0.02    459.96     0.08      684     0.00     0.00  stadt_t::~stadt_t()
  0.02    460.05     0.08                             __dynamic_cast
  0.02    460.12     0.07                             global constructors keyed to _ZlsRSoRK11float32e8_t
  0.01    460.19     0.07 11515646     0.00     0.00  ribi_t::ist_exakt_orthogonal(unsigned char, unsigned char)
  0.01    460.26     0.07 10650932     0.00     0.00  brueckenboden_t::get_weg_hang() const
  0.01    460.33     0.07  7759593     0.00     0.00  vehikel_t::compare_directions(short, short) const
  0.01    460.40     0.07  7138966     0.00     0.00  schiene_t::unreserve(quickstone_tpl<convoi_t>)
  0.01    460.47     0.07  4905303     0.00     0.00  dingliste_t::rdwr(karte_t*, loadsave_t*, koord3d)
  0.01    460.54     0.07  2298522     0.00     0.00  baum_t::rdwr(loadsave_t*)
  0.01    460.61     0.07                             adler32
  0.01    460.68     0.07                             ungetc
  0.01    460.75     0.07 26315743     0.00     0.00  loadsave_t::lsgetc()
  0.01    460.81     0.07 26132665     0.00     0.00  loadsave_t::rdwr_byte(signed char&)
  0.01    460.87     0.06 62841336     0.00     0.00  wasser_t::ist_wasser() const
  0.01    460.93     0.06 27974820     0.00     0.00  loadsave_t::rdwr_short(short&)
  0.01    460.99     0.06 24048084     0.00     0.00  vehikel_t::betrete_feld()
  0.01    461.05     0.06  5281831     0.00     0.00  vehikel_besch_t::calc_running_cost(karte_t const*, unsigned int) const
  0.01    461.11     0.06  5273094     0.00     0.00  ding_t::mark_image_dirty(unsigned short, short) const
  0.01    461.17     0.06  4571680     0.00     0.00  display_mark_img_dirty(unsigned int, short, short)
  0.01    461.23     0.06  1567814     0.00     0.00  hashtable_tpl<koord, unsigned short, koordhash_tpl<koord> >::get(koord) const
  0.01    461.29     0.06  1348972     0.00     0.00  crossing_logic_t::request_crossing(vehikel_basis_t const*)
  0.01    461.35     0.06  1017346     0.00     0.00  fussgaenger_t::erzeuge_fussgaenger_an(karte_t*, koord3d, int&)
  0.01    461.41     0.06   999875     0.00     0.00  fabrik_t::book_weighted_sums(long long)
  0.01    461.47     0.06   587251     0.00     0.00  convoi_t::can_overtake(overtaker_t*, int, short)
  0.01    461.53     0.06   334749     0.00     0.00  haltestelle_t::request_loading(quickstone_tpl<convoi_t>)
  0.01    461.59     0.06    94958     0.00     0.00  convoi_t::book_departure_time(long long)
  0.01    461.65     0.06    89812     0.00     0.00  haltestelle_t::get_average_waiting_time(quickstone_tpl<haltestelle_t>, unsigned char) const
  0.01    461.71     0.06    20280     0.00     0.00  register_image(bild_t*)
  0.01    461.77     0.06      675     0.00     0.00  stadt_t::update_target_cities()
  0.01    461.83     0.06       57     0.00     0.00  non-virtual thunk to fussgaenger_t::sync_step(long)
  0.01    461.89     0.06                             create_textured_tile_mix(bild_besch_t const*, unsigned char, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*)
  0.01    461.94     0.06 20884311     0.00     0.00  freelist_t::putback_node(unsigned int, void*)
  0.01    462.00     0.06 20328165     0.00     0.00  loadsave_t::rd_obj_id()
  0.01    462.06     0.06  3537270     0.00     0.00  automobil_t::get_kosten(grund_t const*, int, koord) const
  0.01    462.11     0.05 65544434     0.00     0.00  grund_t::get_weg_yoff() const
  0.01    462.15     0.05 24202664     0.00     0.00  loadsave_t::end_tag(char const*)
  0.01    462.20     0.05 10258868     0.00     0.00  ribi_typ(koord3d)
  0.01    462.25     0.05  9670769     0.00     0.00  grund_t::get_back_bild(int) const
  0.01    462.31     0.05  7709743     0.00     0.00  boden_t::calc_bild_internal()
  0.01    462.36     0.05  6870216     0.00     0.00  baum_t::calc_bild()
  0.01    462.40     0.05  6536340     0.00     0.00  gebaeude_t::get_passagier_level() const
  0.01    462.45     0.05  5250502     0.00     0.00  convoi_t::add_running_cost(long long, weg_t const*)
  0.01    462.50     0.05  2888960     0.00     0.00  vehikel_t::get_fracht_gewicht() const
  0.01    462.56     0.05  1811259     0.00     0.00  grund_t::display_dinge_all(short, short, short, bool) const
  0.01    462.61     0.05  1696624     0.00     0.00  vehikel_t::get_comfort() const
  0.01    462.65     0.05  1093365     0.00     0.00  haltestelle_t::liefere_an(ware_t)
  0.01    462.70     0.05  1013234     0.00     0.00  hashtable_tpl<unsigned short, convoi_t::departure_data_t, inthash_tpl<unsigned short> >::get(unsigned short) const
  0.01    462.75     0.05   538253     0.00     0.00  convoi_t::get_comfort() const
  0.01    462.80     0.04  5820661     0.00     0.00  spieler_t::buche(long long, player_cost)
  0.01    462.85     0.04    61010     0.00     0.00  stadtauto_t::stadtauto_t(karte_t*, koord3d, koord, slist_tpl<stadtauto_t*>*)
  0.01    462.88     0.04 55041408     0.00     0.00  vehikel_basis_t::get_bild() const
  0.01    462.93     0.04 30776233     0.00     0.00  wasser_t::get_typ() const
  0.01    462.96     0.04 18048627     0.00     0.00  stadtauto_t::is_stuck()
  0.01    463.00     0.04 10258868     0.00     0.00  ribi_typ(koord3d, koord3d)
  0.01    463.05     0.04  5051927     0.00     0.00  grund_t::set_text(char const*)
  0.01    463.08     0.04  5047679     0.00     0.00  dingliste_t::loesche_alle(spieler_t*, unsigned char)
  0.01    463.12     0.04  4871168     0.00     0.00  planquadrat_t::~planquadrat_t()
  0.01    463.17     0.04  2882061     0.00     0.00  signal_t::get_typ() const
  0.01    463.20     0.04  2870125     0.00     0.00  vehikel_t::beladen(quickstone_tpl<haltestelle_t>, bool)
  0.01    463.25     0.04  1664443     0.00     0.00  haltestelle_t::book(long long, int)
  0.01    463.29     0.04  1554900     0.00     0.00  brueckenboden_t::get_weg_yoff() const
  0.01    463.32     0.04  1506190     0.00     0.00  fabrik_t::produktion(unsigned int, long) const
  0.01    463.37     0.04  1219846     0.00     0.00  fabrik_t::get_fab(karte_t const*, koord)
  0.01    463.40     0.04  1197263     0.00     0.00  stadt_t::get_electricity_consumption(int) const
  0.01    463.44     0.04   795058     0.00     0.00  wolke_t::~wolke_t()
  0.01    463.49     0.04    70207     0.00     0.00  pumpe_t::step(long)
  0.01    463.52     0.04    68843     0.00     0.00  stadtauto_t::rdwr(loadsave_t*)
  0.01    463.56     0.04     1150     0.00     0.00  vehikel_besch_t::loaded()
  0.01    463.61     0.04                             pix_outline25_16(unsigned short*, unsigned short const*, unsigned short, unsigned short)
  0.01    463.64     0.04                             non-virtual thunk to schiff_t::ist_befahrbar(grund_t const*) const
  0.01    463.68     0.04 11035408     0.00     0.00  loadsave_t::rdwr_short(unsigned short&)
  0.01    463.71     0.04       24     0.00     0.00  grund_t::neuen_weg_bauen(weg_t*, unsigned char, spieler_t*)
  0.01    463.75     0.04                             potential_convoy_t::update_freight_summary(freight_summary_t&)
  0.01    463.78     0.03 27684217     0.00     0.00  ribi_typ(signed char)
  0.01    463.81     0.03 24202667     0.00     0.00  loadsave_t::start_tag(char const*)
  0.01    463.84     0.03 11655630     0.00     0.00  loadsave_t::rdwr_byte(unsigned char&)
  0.01    463.87     0.03  9208684     0.00     0.00  destroy_win(long)
  0.01    463.90     0.03  9036581     0.00     0.00  tunnelboden_t::get_weg_hang() const
  0.01    463.93     0.03  8906695     0.00     0.00  schiff_t::get_waytype() const
  0.01    463.96     0.03  8694226     0.00     0.00  wasser_t::get_weg_ribi(waytype_t) const
  0.01    463.99     0.03  5215954     0.00     0.00  stadtauto_t::can_overtake(overtaker_t*, int, short)
  0.01    464.02     0.03  5046586     0.00     0.00  dingliste_t::~dingliste_t()
  0.01    464.05     0.03  5046586     0.00     0.00  grund_t::~grund_t()
  0.01    464.08     0.03  4002599     0.00     0.00  vehikel_basis_t::get_tile_steps(koord const&, koord const&, unsigned char&) const
  0.01    464.11     0.03  3773071     0.00     0.00  senke_t::get_power_load() const
  0.01    464.14     0.03  3411497     0.00     0.00  waggon_t::get_kosten(grund_t const*, int, koord) const
  0.01    464.17     0.03  2526111     0.00     0.00  boden_t::boden_t(karte_t*, loadsave_t*, koord)
  0.01    464.20     0.03  2315129     0.00     0.00  baum_t::calc_off(unsigned char, signed char, signed char)
  0.01    464.23     0.03  2298522     0.00     0.00  baum_t::laden_abschliessen()
  0.01    464.26     0.03  2285182     0.00     0.00  haltestelle_t::find_route(minivec_tpl<quickstone_tpl<haltestelle_t> >*, ware_t&, unsigned short)
  0.01    464.29     0.03  2242130     0.00     0.00  dingliste_t::display_dinge_bg(short, short, unsigned char) const
  0.01    464.32     0.03  2207841     0.00     0.00  grund_t::sort_trees()
  0.01    464.35     0.03  1832887     0.00     0.00  hashtable_tpl<id_pair, average_tpl<unsigned short>, koordhash_tpl<id_pair> >::access(id_pair)
  0.01    464.38     0.03  1395121     0.00     0.00  haltestelle_t::find_route(ware_t&, unsigned short)
  0.01    464.41     0.03   598212     0.00     0.00  display_color_img(unsigned int, short, short, signed char, int, int)
  0.01    464.44     0.03   536357     0.00     0.00  automobil_t::betrete_feld()
  0.01    464.47     0.03   360870     0.00     0.00  weg_t::~weg_t()
  0.01    464.50     0.03   166980     0.00     0.00  gebaeude_t::rdwr(loadsave_t*)
  0.01    464.53     0.03   137214     0.00     0.00  crossing_logic_t::release_crossing(vehikel_basis_t const*)
  0.01    464.56     0.03     4120     0.00     0.00  convoi_t::~convoi_t()
  0.01    464.59     0.03                             is_in_list(vector_tpl<route_t::ANode*> const&, grund_t const*)
  0.01    464.62     0.03                             operator new(unsigned int)
  0.01    464.65     0.03                             fgetc
  0.01    464.68     0.03 16132102     0.00     0.00  interrupt_check()
  0.01    464.70     0.03  5082297     0.00     0.00  dingliste_t::calc_bild()
  0.01    464.73     0.03  1828509     0.00     0.00  dingliste_t::ist_da(ding_t const*) const
  0.01    464.75     0.03   714578     0.00     0.00  weg_t::check_season(long)
  0.01    464.77     0.03    74282     0.00     0.00  vehikel_t::calc_restwert() const
  0.01    464.80     0.03                             potential_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  0.01    464.82     0.03                             non-virtual thunk to waggon_t::ist_befahrbar(grund_t const*) const
  0.00    464.85     0.02 32314678     0.00     0.00  weg_t::get_typ() const
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Dwachs

When is adverse_summary_t::add_vehicle(vehikel_t const&) called? It should be only called if the first or last vehicle in a convoy has_hopped.

In this function, the call to adverse_summary_t::add_vehicle(const vehikel_besch_t &b, bool is_first) seems to be redundant in most cases, as the resistance values will presumably only change, if the convoy itself is changed.
Parsley, sage, rosemary, and maggikraut.

jamespetts

I think that the adverse summary add vehicle method is called whenever a convoy reaches a stop, and its weight has to be recalculated with the load. There are a very great many convoys on this map. However, without private cars (or with not so many of them), it's perfectly playable, so that's not so much the issue.

Here's a profile with the 1979 version of the map (same as profiled in the first sample) with the memory pool:


Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
time   seconds   seconds    calls   s/call   s/call  name   
27.29    137.69   137.69   392080     0.00     0.00  stadtauto_t::~stadtauto_t()
13.51    205.83    68.14 2582125677     0.00     0.00  float32e8_t::operator*(float32e8_t const&) const
  8.45    248.47    42.64   426928     0.00     0.00  karte_t::sync_remove(sync_steppable*)
  6.76    282.56    34.09 2592333533     0.00     0.00  ild(unsigned int)
  6.51    315.42    32.86                             __udivdi3
  6.43    347.86    32.44 326656263     0.00     0.00  existing_convoy_t::get_brake_summary(int)
  4.39    370.03    22.17 1973395844     0.00     0.00  float32e8_t::operator+(float32e8_t const&) const
  4.38    392.12    22.09 2271165840     0.00     0.00  float32e8_t::set_value(unsigned int)
  4.08    412.68    20.56   628736     0.00     0.00  convoy_t::calc_move(long, float32e8_t const&, weight_summary_t const&, int, int, int, int, int&, int&, float32e8_t&)
  3.79    431.78    19.10 3602519784     0.00     0.00  float32e8_t::operator/(float32e8_t const&) const
  2.27    443.24    11.46 2269837877     0.00     0.00  float32e8_t::set_value(int)
  1.98    453.22     9.98 3603020804     0.00     0.00  float32e8_t::to_sint32() const
  1.13    458.92     5.70     1773     0.00     0.01  karte_t::sync_step(long, bool, bool)
  0.97    463.79     4.87 2947209195     0.00     0.00  lazy_convoy_t::get_adverse_summary()
  0.85    468.07     4.28                             BZ2_bzDecompress@4
  0.78    472.01     3.94                             BZ2_decompress
  0.55    474.78     2.77 327447584     0.00     0.00  float32e8_t::operator-(float32e8_t const&) const
  0.44    476.99     2.21        1     2.21   408.75  karte_t::interactive(unsigned int)
  0.43    479.18     2.19  2118214     0.00     0.00  display_img_aux(unsigned int, short, short, signed char, int, int)
  0.31    480.73     1.55  1904243     0.00     0.00  get_pair(int)
  0.28    482.13     1.40     1261     0.00     0.02  route_t::intern_calc_route(karte_t*, koord3d, koord3d, fahrer_t*, int, unsigned int, unsigned int)
  0.22    483.23     1.10  6831945     0.00     0.00  stadt_t::add_target_attraction(gebaeude_t*)
  0.21    484.29     1.06 13193444     0.00     0.00  stadtauto_t::hop_check()
  0.20    485.32     1.03      120     0.01     0.01  path_explorer_t::compartment_t::step()
  0.20    486.32     1.00 10483924     0.00     0.00  vehikel_basis_t::no_cars_blocking(grund_t const*, convoi_t const*, unsigned char, unsigned char, unsigned char)
  0.19    487.27     0.95    14166     0.00     0.00  karte_t::interactive_event(event_t&)
  0.15    488.04     0.77  3655200     0.00     0.00  adverse_summary_t::add_vehicle(vehikel_t const&)
  0.14    488.74     0.70 326656263     0.00     0.00  convoy_t::get_braking_force(int)
  0.12    489.35     0.60 25911128     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, unsigned char) const
  0.12    489.93     0.58                             operator<<(std::ostream&, float32e8_t const&)
  0.11    490.51     0.58 26578366     0.00     0.00  grund_t::get_weg_ribi_unmasked(waytype_t) const
  0.11    491.06     0.55 18229147     0.00     0.00  void templated_pixcopy<(pixcopy_routines)0>(unsigned short*, unsigned short const*, unsigned short const*)
  0.10    491.55     0.49 102089490     0.00     0.00  stadtauto_t::sync_step(long)
  0.10    492.04     0.49                             BZ2_bzRead@16
  0.07    492.42     0.38                             global constructors keyed to _ZlsRSoRK11float32e8_t
  0.07    492.75     0.33  5052469     0.00     0.00  grund_t::calc_back_bild(signed char, signed char)
  0.07    493.07     0.33    14939     0.00     0.00  display_poll_event(event_t*)
  0.07    493.40     0.33                             fill_event(event_t*)
  0.06    493.71     0.31  9423435     0.00     0.00  stadtauto_t::ist_weg_frei(grund_t*)
  0.06    494.02     0.31    14556     0.00     0.00  spieler_t::age_messages(long)
  0.06    494.31     0.28     1522     0.00     0.00  karte_ansicht_t::display(bool)
  0.05    494.57     0.27 46973023     0.00     0.00  vehikel_basis_t::calc_richtung(koord, koord)
  0.05    494.81     0.23 31047789     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  0.04    495.02     0.22   615913     0.00     0.00  convoi_t::increment_odometer(unsigned int)
  0.04    495.24     0.21   455706     0.00     0.00  void weighted_vector_tpl<stadt_t::target_city_t>::insert_ordered<bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&)>(stadt_t::target_city_t const&, unsigned long, bool (*)(stadt_t::target_city_t const&, stadt_t::target_city_t const&), unsigned int)
  0.04    495.44     0.20      684     0.00     0.00  karte_t::rem_stadt(stadt_t*)
  0.04    495.63     0.20                             potential_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  0.04    495.83     0.20   279033     0.00     0.00  interrupt_check(char const*)
  0.04    496.02     0.19   671536     0.00     0.00  existing_convoy_t::update_vehicle_summary(vehicle_summary_t&)
  0.04    496.20     0.18    34963     0.00     0.00  image_reader_t::read_node(_iobuf*, obj_node_info_t&)
  0.03    496.36     0.16 16827578     0.00     0.00  marker_t::ist_markiert(grund_t const*) const
  0.03    496.51     0.15   628736     0.00     0.00  convoi_t::calc_acceleration(long)
  0.03    496.66     0.15   279033     0.00     0.00  interrupt_check()
  0.03    496.81     0.14    14888     0.00     0.00  win_poll_event(event_t*)
  0.03    496.94     0.14 50490958     0.00     0.00  loadsave_t::read(void*, unsigned int)
  0.03    497.08     0.14                             myfeof
  0.03    497.21     0.13  4871168     0.00     0.00  planquadrat_t::rdwr(karte_t*, loadsave_t*, koord)
  0.03    497.35     0.13   418168     0.00     0.00  verkehrsteilnehmer_t::~verkehrsteilnehmer_t()
  0.03    497.48     0.13    68927     0.00     0.00  stadt_t::find_destination(stadt_t::factory_set_t&, long long, stadt_t::pax_return_type*, unsigned int, unsigned int, koord)
  0.02    497.60     0.12 29015925     0.00     0.00  loadsave_t::lsgetc()
  0.02    497.71     0.12  4905618     0.00     0.00  grund_t::rdwr(loadsave_t*)
  0.02    497.83     0.12  2193097     0.00     0.00  wasser_t::calc_bild_internal()
  0.02    497.95     0.12                             win_get_event(event_t*)
  0.02    498.06     0.11  2042855     0.00     0.00  dingliste_t::remove(ding_t const*)
  0.02    498.17     0.11   387469     0.00     0.00  stadtauto_t::rdwr(loadsave_t*)
  0.02    498.28     0.11        2     0.06     4.41  karte_t::laden(loadsave_t*)
  0.02    498.39     0.11                             display_fb_internal(short, short, short, short, int, bool, short, short, short, short)
  0.02    498.49     0.10 112066707     0.00     0.00  stadtauto_t::get_typ() const
  0.02    498.59     0.10  3595447     0.00     0.00  display_mark_img_dirty(unsigned int, short, short)
  0.02    498.69     0.10  1072294     0.00     0.00  stadtauto_t::calc_current_speed()
  0.02    498.79     0.10     1918     0.00     0.00  haltestelle_t::laden_abschliessen(bool)
  0.02    498.88     0.09 11175780     0.00     0.00  freelist_t::gimme_node(unsigned int)
  0.02    498.97     0.09  2508398     0.00     0.00  vehikel_basis_t::calc_height()
  0.02    499.06     0.09  2423658     0.00     0.00  baum_t::rdwr(loadsave_t*)
  0.02    499.15     0.09  1458763     0.00     0.00  vehikel_basis_t::verlasse_feld()
  0.02    499.23     0.08  1865056     0.00     0.00  dingliste_t::intern_add_moving(ding_t*)
  0.02    499.31     0.08   299192     0.00     0.00  vehikel_t::hop()
  0.02    499.39     0.08    38688     0.00     0.00  haltestelle_t::hole_ab(ware_besch_t const*, unsigned int, schedule_t const*, spieler_t const*, convoi_t*, bool)
  0.02    499.47     0.08    27615     0.00     0.00  toolbar_t::get_icon(spieler_t*) const
  0.02    499.55     0.08     1950     0.00     0.00  haltestelle_t::~haltestelle_t()
  0.02    499.63     0.08                             non-virtual thunk to stadtauto_t::sync_step(long)
  0.01    499.70     0.07 20776595     0.00     0.00  loadsave_t::rd_obj_id()
  0.01    499.77     0.07  4905618     0.00     0.00  dingliste_t::rdwr(karte_t*, loadsave_t*, koord3d)
  0.01    499.84     0.07   560846     0.00     0.00  grund_t::display_dinge_all(short, short, short, bool) const
  0.01    499.91     0.07    14689     0.00     0.00  dr_sleep(unsigned int)
  0.01    499.98     0.07                             __divdi3
  0.01    500.05     0.07                             adler32
  0.01    500.12     0.07 19557568     0.00     0.00  loadsave_t::start_tag(char const*)
  0.01    500.18     0.06 22252039     0.00     0.00  wasser_t::get_weg_ribi_unmasked(waytype_t) const
  0.01    500.24     0.06 11146050     0.00     0.00  freelist_t::putback_node(unsigned int, void*)
  0.01    500.30     0.06 11138460     0.00     0.00  schiff_t::ist_befahrbar(grund_t const*) const
  0.01    500.36     0.06  2423658     0.00     0.00  baum_t::laden_abschliessen()
  0.01    500.42     0.06   671536     0.00     0.00  existing_convoy_t::update_weight_summary(weight_summary_t&)
  0.01    500.48     0.06      684     0.00     0.00  stadt_t::rdwr(loadsave_t*)
  0.01    500.52     0.05 58542538     0.00     0.00  strasse_t::get_waytype() const
  0.01    500.57     0.05 28848414     0.00     0.00  loadsave_t::rdwr_byte(signed char&)
  0.01    500.62     0.05  5056065     0.00     0.00  dingliste_t::add(ding_t*)
  0.01    500.68     0.05   974267     0.00     0.00  haltestelle_t::get_halt(karte_t const*, koord3d, spieler_t const*)
  0.01    500.73     0.05   434840     0.00     0.00  display_text_proportional_len_clip(short, short, char const*, int, unsigned short, long)
  0.01    500.77     0.05   216942     0.00     0.00  grund_t::get_weg(waytype_t) const
  0.01    500.82     0.05    30773     0.00     0.00  waggon_t::block_reserver(route_t*, unsigned short, unsigned short&, unsigned short&, int, bool, bool) const
  0.01    500.88     0.05    14939     0.00     0.00  GetEventsNoWait()
  0.01    500.93     0.05    10225     0.00     0.00  karte_t::remove_ausflugsziel(gebaeude_t*)
  0.01    500.98     0.05     7692     0.00     0.00  dr_prepare_flush()
  0.01    501.02     0.05        1     0.05   573.01  WinMain@16
  0.01    501.07     0.05                             create_textured_tile_mix(bild_besch_t const*, unsigned char, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*)
  0.01    501.12     0.04       83     0.00     0.00  win_is_open(gui_frame_t*)
  0.01    501.16     0.04 54899924     0.00     0.00  grund_t::get_weg_hang() const
  0.01    501.20     0.04 28457680     0.00     0.00  boden_t::get_typ() const
  0.01    501.24     0.04 22034156     0.00     0.00  wasser_t::ist_wasser() const
  0.01    501.28     0.04  9685890     0.00     0.00  simrand(unsigned int, char const*)
  0.01    501.32     0.04  8719541     0.00     0.00  win_get_magic(long)
  0.01    501.36     0.04  2392895     0.00     0.00  stadt_t::is_within_city_limits(koord) const
  0.01    501.40     0.04  1518664     0.00     0.00  ding_t::display(int, int) const
  0.01    501.44     0.04   925961     0.00     0.00  convoi_t::step()
  0.01    501.48     0.04   859063     0.00     0.00  haltestelle_t::get_next_pos(koord) const
  0.01    501.52     0.04   336352     0.00     0.00  gebaeude_t::get_bild() const
  0.01    501.56     0.04   303238     0.00     0.00  translator::lang_info::translate(char const*) const
  0.01    501.60     0.04   170550     0.00     0.00  planquadrat_t::remove_from_haltlist(karte_t*, quickstone_tpl<haltestelle_t>)
  0.01    501.64     0.04   152098     0.00     0.00  display_calc_proportional_string_len_width(char const*, unsigned int)
  0.01    501.68     0.04    18338     0.00     0.00  wegbauer_t::waytype_available(waytype_t, unsigned short)
  0.01    501.72     0.04                             non-virtual thunk to stadtauto_t::~stadtauto_t()
  0.01    501.75     0.04 15072530     0.00     0.00  ribi_typ(koord, koord)
  0.01    501.79     0.03 19557565     0.00     0.00  loadsave_t::end_tag(char const*)
  0.01    501.81     0.03 15884039     0.00     0.00  ribi_typ(koord)
  0.01    501.85     0.03  8695662     0.00     0.00  koord3d const& pick_any_weighted<koord3d, weighted_vector_tpl>(weighted_vector_tpl<koord3d> const&)
  0.01    501.88     0.03  6831990     0.00     0.00  gebaeude_t::get_passagier_level() const
  0.01    501.90     0.03  6088516     0.00     0.00  waggon_t::get_waytype() const
  0.01    501.94     0.03  4141371     0.00     0.00  ding_t::mark_image_dirty(unsigned short, short) const
  0.01    501.96     0.03  2855751     0.00     0.00  marker_t::markiere(grund_t const*)
  0.01    502.00     0.03  2423658     0.00     0.00  baum_t::calc_off(unsigned char, signed char, signed char)
  0.01    502.02     0.03  1908288     0.00     0.00  stadtauto_t::calc_bild()
  0.01    502.06     0.03  1516880     0.00     0.00  dingliste_t::suche(ding_t::typ, unsigned char) const
  0.01    502.08     0.03   912072     0.00     0.00  dingliste_t::display_dinge_bg(short, short, unsigned char) const
  0.01    502.12     0.03   900928     0.00     0.00  convoi_t::sync_step(long)
  0.01    502.14     0.03   469774     0.00     0.00  grund_t::display_boden(short, short, short) const
  0.01    502.18     0.03   171962     0.00     0.00  hausbauer_t::find_tile(char const*, int)
  0.01    502.20     0.03   128146     0.00     0.00  waggon_t::ist_befahrbar(grund_t const*) const
  0.01    502.24     0.03    20280     0.00     0.00  register_image(bild_t*)
  0.01    502.26     0.03     3743     0.00     0.00  karte_t::rem_convoi(quickstone_tpl<convoi_t>&)
  0.01    502.30     0.03     1526     0.00     0.00  get_random_seed()
  0.01    502.32     0.03      684     0.00     0.00  stadt_t::~stadt_t()
  0.01    502.36     0.03                             fgetc
  0.00    502.38     0.03  5050853     0.00     0.00  grund_t::operator delete(void*, unsigned int)
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

kierongreen

With 300k vehicles you could create separate lists for each town as a minimum.

jamespetts

There already are separate lists for each town - that was one of those lists.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

kierongreen

300k cars for one town? How did you have roadspace on map for them?