skip recalculating radar values and last beat when loading from cache. loading songs from the cache is now 5x faster.
fyi: it took 1:40 minutes to load my library, now it's only 20 seconds.
This commit is contained in:
+9
-1
@@ -31,7 +31,8 @@ Steps::Steps(): m_StepsType(StepsType_Invalid),
|
||||
m_sNoteDataCompressed(""), m_sFilename(""), m_bSavedToDisk(false),
|
||||
m_LoadedFromProfile(ProfileSlot_Invalid), m_iHash(0),
|
||||
m_sDescription(""), m_sChartStyle(""),
|
||||
m_Difficulty(Difficulty_Invalid), m_iMeter(0), m_sCredit("") {}
|
||||
m_Difficulty(Difficulty_Invalid), m_iMeter(0), m_sCredit(""),
|
||||
m_bAreCachedRadarValuesJustLoaded(false) {}
|
||||
|
||||
Steps::~Steps()
|
||||
{
|
||||
@@ -171,6 +172,12 @@ void Steps::CalculateRadarValues( float fMusicLengthSeconds )
|
||||
if( parent != NULL )
|
||||
return;
|
||||
|
||||
if( m_bAreCachedRadarValuesJustLoaded )
|
||||
{
|
||||
m_bAreCachedRadarValuesJustLoaded = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Do write radar values, and leave it up to the reading app whether they want to trust
|
||||
// the cached values without recalculating them.
|
||||
/*
|
||||
@@ -422,6 +429,7 @@ void Steps::SetCachedRadarValues( const RadarValues v[NUM_PLAYERS] )
|
||||
{
|
||||
DeAutogen();
|
||||
copy( v, v + NUM_PLAYERS, m_CachedRadarValues );
|
||||
m_bAreCachedRadarValuesJustLoaded = true;
|
||||
}
|
||||
|
||||
bool Steps::UsesSplitTiming() const
|
||||
|
||||
Reference in New Issue
Block a user