Various changes to speed up start up time:

Added delay_save_cache to SongCacheIndex so that it doesn't write the entire cache index file after every song is loaded when loading songs.
Added m_SongsByDir to SongManager so that GetSongFromDir doesn't have to walk the entire list of songs.
Minor changes to when LoadEnabledSongsFromPref occurs and how SanityCheckGroupDir works to speed up loading.
Song::ReloadFromSongDir removes cache file to force an actual reload from the song dir instead of reloading from the cache.  ReloadFromSongDir exposed to lua.
Reordered Actor::LoadFromNode to put Command first because that case is more common.
Course::GetTrailUnsorted reserves entries before starting to save time reallocating.
join in RageUtil calculates the final size of the concatenated strings reserves it to save time reallocating.
Added time log file to RageLog for profiling.
This commit is contained in:
Kyzentun
2015-03-30 17:45:52 -06:00
parent 3c70b13fcf
commit 8b09da8e64
12 changed files with 133 additions and 37 deletions
+2
View File
@@ -178,8 +178,10 @@ protected:
void AddGroup( RString sDir, RString sGroupDirName );
int GetNumEditsLoadedFromProfile( ProfileSlot slot ) const;
void AddSongToList(Song* new_song);
/** @brief All of the songs that can be played. */
vector<Song*> m_pSongs;
map<RString, Song*> m_SongsByDir;
/** @brief Hold pointers to all the songs that have been deleted from disk but must at least be kept temporarily alive for smooth audio transitions. */
vector<Song*> m_pDeletedSongs;
/** @brief The most popular songs ranked by number of plays. */