save memory by loading SMData from cache on demand
This commit is contained in:
+11
-7
@@ -262,6 +262,17 @@ bool Song::LoadFromSongDir( CString sDir )
|
||||
SaveToCacheFile();
|
||||
}
|
||||
|
||||
|
||||
|
||||
for( unsigned i=0; i<m_vpSteps.size(); i++ )
|
||||
{
|
||||
m_vpSteps[i]->SetFile( GetCacheFilePath() );
|
||||
|
||||
/* Compress all Steps. During initial caching, this will remove cached NoteData;
|
||||
* during cached loads, this will just remove cached SMData. */
|
||||
m_vpSteps[i]->Compress();
|
||||
}
|
||||
|
||||
/* Load the cached banners, if it's not loaded already. */
|
||||
if( m_bHasBanner )
|
||||
BANNERCACHE->LoadBanner( GetBannerPath() );
|
||||
@@ -814,13 +825,6 @@ void Song::TidyUpData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Compress all Steps
|
||||
for( i=0; i<m_vpSteps.size(); i++ )
|
||||
{
|
||||
m_vpSteps[i]->Compress();
|
||||
}
|
||||
}
|
||||
|
||||
void Song::TranslateTitles()
|
||||
|
||||
Reference in New Issue
Block a user