From cae67eb4abe256ab880dd147288583828acc9988 Mon Sep 17 00:00:00 2001 From: Quentin Bray Date: Mon, 22 Jun 2026 20:41:53 +0200 Subject: [PATCH] Remove ReloadSongMethod (#879) Seems to not be usefull since song is cloned is others game mode Improve performance by stop reloading TXT file Didn't see any difference with and without instead of just song load perfs imrpovement Maybe that I miss a point ? --- Vocaluxe/Screens/CScreenSing.cs | 9 ++------- VocaluxeLib/Songs/CSong.cs | 13 ------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index dd3349b8..40acac6e 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1371,7 +1371,7 @@ namespace Vocaluxe.Screens _CloseSong(); CGame.ResetPlayer(); - _LoadCurrentSong(false); + _LoadCurrentSong(); _StartSong(); } @@ -1531,7 +1531,7 @@ namespace Vocaluxe.Screens /// /// Prepare streams and screen for current song. /// - private void _LoadCurrentSong(bool reloadNotes = true) + private void _LoadCurrentSong() { if (CGame.IsFinished()) { @@ -1547,11 +1547,6 @@ namespace Vocaluxe.Screens return; } - if (!_Sso.Selection.PartyMode && (CGame.GameMode == EGameMode.TR_GAMEMODE_NORMAL || CGame.GameMode == EGameMode.TR_GAMEMODE_DUET)) - { - song.ReloadSong(reloadNotes); - } - var songname = song.Artist + " - " + song.Title; var rounds = CGame.GetNumSongs(); if (rounds > 1) diff --git a/VocaluxeLib/Songs/CSong.cs b/VocaluxeLib/Songs/CSong.cs index 2788a85d..4190cd54 100644 --- a/VocaluxeLib/Songs/CSong.cs +++ b/VocaluxeLib/Songs/CSong.cs @@ -305,19 +305,6 @@ namespace VocaluxeLib.Songs return loader.ReadNotes(); } - public bool ReloadSong(bool reloadNotes) - { - var loader = new CSongLoader(this); - var retValue = loader.ReadHeader(); - if (!retValue) - { - return false; - } - - retValue = loader.ReadNotes(reloadNotes); - return retValue; - } - public bool Save() { return Save(Path.Combine(Folder, FileName));