Refactor:
It seems to be no big deal to have a lot of small files; I think it's the actual scan of the song tree that's expensive. Simplify with this in mind. Load song banners when the song is loaded, so we don't load banners for songs that aren't there. Avoid touching the original banner when we're simply loading.
This commit is contained in:
@@ -374,6 +374,10 @@ bool Song::LoadFromSongDir( CString sDir )
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Load the cached banner, if it's not loaded already. */
|
||||
if( HasBanner() )
|
||||
BANNERCACHE->LoadBanner( GetBannerPath() );
|
||||
|
||||
{
|
||||
/* Generated filename; this doesn't always point to a loadable file,
|
||||
* but instead points to the file we should write changed files to,
|
||||
@@ -687,7 +691,7 @@ void Song::TidyUpData()
|
||||
}
|
||||
|
||||
if( HasBanner() )
|
||||
BANNERCACHE->CacheSongBanner( GetBannerPath() );
|
||||
BANNERCACHE->CacheBanner( GetBannerPath() );
|
||||
|
||||
|
||||
// If no BGChanges are specified and there are movies in the song directory, then assume
|
||||
|
||||
Reference in New Issue
Block a user