diff options
author | Patric Stout <truebrain@openttd.org> | 2021-04-30 11:57:37 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-04-30 12:48:41 +0200 |
commit | 665a3928e2f07e6ee1faed1c8b08fe3a68fbc37a (patch) | |
tree | 8cd661bfeeddb5a618a2c22519f2b3d89507dfbb /src/pathfinder/yapf/yapf_costrail.hpp | |
parent | e162aff7a3d1dfcde1a9d02780235c617b6d4983 (diff) | |
download | openttd-665a3928e2f07e6ee1faed1c8b08fe3a68fbc37a.tar.xz |
Remove: performance measurements in YAPF
YAPF was constantly measuring its performance, but only at
certain debug-levels this information was shown.
Now after years, I sincerely wonder if anyone still knows about this
feature and who still use it. Especially with the new framerate window,
this detailed performance is not as meaningful anymore as it once
was.
Diffstat (limited to 'src/pathfinder/yapf/yapf_costrail.hpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_costrail.hpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index 6bed27cba..b50300b61 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -86,7 +86,6 @@ protected: public: inline int SlopeCost(TileIndex tile, Trackdir td) { - CPerfStart perf_cost(Yapf().m_perf_slope_cost); if (!stSlopeCost(tile, td)) return 0; return Yapf().PfGetSettings().rail_slope_penalty; } @@ -172,7 +171,6 @@ public: { int cost = 0; /* if there is one-way signal in the opposite direction, then it is not our way */ - CPerfStart perf_cost(Yapf().m_perf_other_cost); if (IsTileType(tile, MP_RAILWAY)) { bool has_signal_against = HasSignalOnTrackdir(tile, ReverseTrackdir(trackdir)); bool has_signal_along = HasSignalOnTrackdir(tile, trackdir); @@ -275,8 +273,6 @@ public: assert(tf->m_new_tile == n.m_key.m_tile); assert((HasTrackdir(tf->m_new_td_bits, n.m_key.m_td))); - CPerfStart perf_cost(Yapf().m_perf_cost); - /* Does the node have some parent node? */ bool has_parent = (n.m_parent != nullptr); @@ -326,7 +322,7 @@ public: EndSegmentReasonBits end_segment_reason = ESRB_NONE; - TrackFollower tf_local(v, Yapf().GetCompatibleRailTypes(), &Yapf().m_perf_ts_cost); + TrackFollower tf_local(v, Yapf().GetCompatibleRailTypes()); if (!has_parent) { /* We will jump to the middle of the cost calculator assuming that segment cache is not used. */ @@ -484,7 +480,7 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th /* Move to the next tile/trackdir. */ tf = &tf_local; - tf_local.Init(v, Yapf().GetCompatibleRailTypes(), &Yapf().m_perf_ts_cost); + tf_local.Init(v, Yapf().GetCompatibleRailTypes()); if (!tf_local.Follow(cur.tile, cur.td)) { assert(tf_local.m_err != TrackFollower::EC_NONE); |