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

@@ -18,7 +18,6 @@
#include "../tunnelbridge_map.h"
#include "../depot_map.h"
#include "pathfinder_func.h"
#include "pf_performance_timer.hpp"
/**
* Track follower helper template class (can serve pathfinders and vehicle
@@ -49,34 +48,32 @@ struct CFollowTrackT
bool m_is_station; ///< last turn passed station
int m_tiles_skipped; ///< number of skipped tunnel or station tiles
ErrorCode m_err;
CPerformanceTimer *m_pPerf;
RailTypes m_railtypes;
inline CFollowTrackT(const VehicleType *v = nullptr, RailTypes railtype_override = INVALID_RAILTYPES, CPerformanceTimer *pPerf = nullptr)
inline CFollowTrackT(const VehicleType *v = nullptr, RailTypes railtype_override = INVALID_RAILTYPES)
{
Init(v, railtype_override, pPerf);
Init(v, railtype_override);
}
inline CFollowTrackT(Owner o, RailTypes railtype_override = INVALID_RAILTYPES, CPerformanceTimer *pPerf = nullptr)
inline CFollowTrackT(Owner o, RailTypes railtype_override = INVALID_RAILTYPES)
{
assert(IsRailTT());
m_veh = nullptr;
Init(o, railtype_override, pPerf);
Init(o, railtype_override);
}
inline void Init(const VehicleType *v, RailTypes railtype_override, CPerformanceTimer *pPerf)
inline void Init(const VehicleType *v, RailTypes railtype_override)
{
assert(!IsRailTT() || (v != nullptr && v->type == VEH_TRAIN));
m_veh = v;
Init(v != nullptr ? v->owner : INVALID_OWNER, IsRailTT() && railtype_override == INVALID_RAILTYPES ? Train::From(v)->compatible_railtypes : railtype_override, pPerf);
Init(v != nullptr ? v->owner : INVALID_OWNER, IsRailTT() && railtype_override == INVALID_RAILTYPES ? Train::From(v)->compatible_railtypes : railtype_override);
}
inline void Init(Owner o, RailTypes railtype_override, CPerformanceTimer *pPerf)
inline void Init(Owner o, RailTypes railtype_override)
{
assert(!IsRoadTT() || m_veh != nullptr);
assert(!IsRailTT() || railtype_override != INVALID_RAILTYPES);
m_veh_owner = o;
m_pPerf = pPerf;
/* don't worry, all is inlined so compiler should remove unnecessary initializations */
m_old_tile = INVALID_TILE;
m_old_td = INVALID_TRACKDIR;
@@ -237,7 +234,6 @@ protected:
/** stores track status (available trackdirs) for the new tile into m_new_td_bits */
inline bool QueryNewTileTrackStatus()
{
CPerfStart perf(*m_pPerf);
if (IsRailTT() && IsPlainRailTile(m_new_tile)) {
m_new_td_bits = (TrackdirBits)(GetTrackBits(m_new_tile) * 0x101);
} else if (IsRoadTT()) {