mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Improved loading speed by skipping game loading in certain instances
No longer attempt to load games in profile reload, and in create profile. Need it for all other modes, but at least those two load quicker now!
This commit is contained in:
parent
9cdb1cb3f2
commit
5f266aacbb
@ -316,6 +316,9 @@ namespace DisplayMagician {
|
|||||||
// This is the RunShortcut command
|
// This is the RunShortcut command
|
||||||
app.Command(DisplayMagicianStartupAction.RunShortcut.ToString(), (runShortcutCmd) =>
|
app.Command(DisplayMagicianStartupAction.RunShortcut.ToString(), (runShortcutCmd) =>
|
||||||
{
|
{
|
||||||
|
// Try to load all the games in parallel to this process
|
||||||
|
Task.Run(() => LoadGamesInBackground());
|
||||||
|
|
||||||
// Set the --trace or --debug options if supplied
|
// Set the --trace or --debug options if supplied
|
||||||
if (trace.HasValue())
|
if (trace.HasValue())
|
||||||
{
|
{
|
||||||
@ -588,6 +591,10 @@ namespace DisplayMagician {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.Info("Starting Normally...");
|
logger.Info("Starting Normally...");
|
||||||
|
|
||||||
|
// Try to load all the games in parallel to this process
|
||||||
|
Task.Run(() => LoadGamesInBackground());
|
||||||
|
|
||||||
StartUpApplication();
|
StartUpApplication();
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
@ -605,9 +612,6 @@ namespace DisplayMagician {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to load all the games in parallel to this process
|
|
||||||
Task.Run(() => LoadGamesInBackground());
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
logger.Debug($"Starting commandline processing");
|
logger.Debug($"Starting commandline processing");
|
||||||
@ -658,6 +662,9 @@ namespace DisplayMagician {
|
|||||||
|
|
||||||
IPCService.GetInstance().Status = InstanceStatus.User;
|
IPCService.GetInstance().Status = InstanceStatus.User;
|
||||||
|
|
||||||
|
if (ProgramSettings.LoadSettings().ShowSplashScreen && AppSplashScreen != null && !AppSplashScreen.Disposing && !AppSplashScreen.IsDisposed)
|
||||||
|
AppSplashScreen.Invoke(new Action(() => AppSplashScreen.Close()));
|
||||||
|
|
||||||
// Run the program with directly showing CreateProfile form
|
// Run the program with directly showing CreateProfile form
|
||||||
Application.Run(new DisplayProfileForm());
|
Application.Run(new DisplayProfileForm());
|
||||||
|
|
||||||
@ -788,6 +795,9 @@ namespace DisplayMagician {
|
|||||||
throw new Exception(Language.Cannot_find_shortcut_in_library);
|
throw new Exception(Language.Cannot_find_shortcut_in_library);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ProgramSettings.LoadSettings().ShowSplashScreen && AppSplashScreen != null && !AppSplashScreen.Disposing && !AppSplashScreen.IsDisposed)
|
||||||
|
AppSplashScreen.Invoke(new Action(() => AppSplashScreen.Close()));
|
||||||
|
|
||||||
if (shortcutToRun is ShortcutItem)
|
if (shortcutToRun is ShortcutItem)
|
||||||
{
|
{
|
||||||
ShortcutRepository.RunShortcut(shortcutToRun);
|
ShortcutRepository.RunShortcut(shortcutToRun);
|
||||||
@ -815,6 +825,9 @@ namespace DisplayMagician {
|
|||||||
ProfileItem profileToUse = ProfileRepository.AllProfiles.Where(p => p.UUID.Equals(profileName)).First();
|
ProfileItem profileToUse = ProfileRepository.AllProfiles.Where(p => p.UUID.Equals(profileName)).First();
|
||||||
logger.Trace($"Program/RunProfile: Found profile called {profileName} and now starting to apply the profile");
|
logger.Trace($"Program/RunProfile: Found profile called {profileName} and now starting to apply the profile");
|
||||||
|
|
||||||
|
if (ProgramSettings.LoadSettings().ShowSplashScreen && AppSplashScreen != null && !AppSplashScreen.Disposing && !AppSplashScreen.IsDisposed)
|
||||||
|
AppSplashScreen.Invoke(new Action(() => AppSplashScreen.Close()));
|
||||||
|
|
||||||
ProfileRepository.ApplyProfile(profileToUse);
|
ProfileRepository.ApplyProfile(profileToUse);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ using System.Resources;
|
|||||||
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
[assembly: AssemblyVersion("2.1.0.59")]
|
[assembly: AssemblyVersion("2.1.0.65")]
|
||||||
[assembly: AssemblyFileVersion("2.1.0.59")]
|
[assembly: AssemblyFileVersion("2.1.0.65")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user