From 5edf762024bb173e38467a6c3491065617061864 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 4 Sep 2003 06:57:36 +0000 Subject: [PATCH] fix quit taking a long time --- stepmania/src/SongManager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index f957c2304d..a2228496c4 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -1255,7 +1255,13 @@ void SongManager::WriteStatsWebPage() { Song* pSong = m_pSongs[i]; fprintf( fp, "" ); - CString sImagePath = pSong->HasBanner() ? pSong->GetBannerPath() : (pSong->HasBackground() ? pSong->GetBackgroundPath() : "" ); + /* XXX: We can't call pSong->HasBanner on every song; it'll effectively re-traverse the entire + * song directory tree checking if each banner file really exists. + * + * (Note for testing this: remember that we'll cache directories for a time; this is only slow if + * the directory cache expires before we get here.) */ + //CString sImagePath = pSong->HasBanner() ? pSong->GetBannerPath() : (pSong->HasBackground() ? pSong->GetBackgroundPath() : "" ); + CString sImagePath = pSong->GetBannerPath(); if( sImagePath.empty() ) fprintf( fp, " " ); else