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.
This commit is contained in:
Patric Stout
2021-04-30 11:57:37 +02:00
committed by Patric Stout
parent e162aff7a3
commit 665a3928e2
9 changed files with 20 additions and 137 deletions

View File

@@ -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);