diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs index 4d515a608c..c5c33fdac9 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs @@ -20,10 +20,7 @@ namespace Microsoft.Plugin.Program { internal static ProgramPluginSettings Settings { get; set; } - private static bool IsStartupIndexProgramsRequired => Settings.LastIndexTime.AddDays(3) < DateTime.Today; - private static PluginInitContext _context; - private readonly PluginJsonStorage _settingsStorage; private bool _disposed; private PackageRepository _packageRepository = new PackageRepository(new PackageCatalogWrapper(), new BinaryStorage>("UWP")); @@ -41,27 +38,14 @@ namespace Microsoft.Plugin.Program // Initialize the Win32ProgramRepository with the settings object _win32ProgramRepository = new Win32ProgramRepository(_win32ProgramRepositoryHelper.FileSystemWatchers.Cast().ToList(), new BinaryStorage>("Win32"), Settings, _win32ProgramRepositoryHelper.PathsToWatch); - Stopwatch.Normal("|Microsoft.Plugin.Program.Main|Preload programs cost", () => - { - _win32ProgramRepository.Load(); - _packageRepository.Load(); - }); - Log.Info($"|Microsoft.Plugin.Program.Main|Number of preload win32 programs <{_win32ProgramRepository.Count()}>"); - var a = Task.Run(() => { - if (IsStartupIndexProgramsRequired || !_win32ProgramRepository.Any()) - { - Stopwatch.Normal("|Microsoft.Plugin.Program.Main|Win32Program index cost", _win32ProgramRepository.IndexPrograms); - } + Stopwatch.Normal("|Microsoft.Plugin.Program.Main|Win32Program index cost", _win32ProgramRepository.IndexPrograms); }); var b = Task.Run(() => { - if (IsStartupIndexProgramsRequired || !_packageRepository.Any()) - { - Stopwatch.Normal("|Microsoft.Plugin.Program.Main|Win32Program index cost", _packageRepository.IndexPrograms); - } + Stopwatch.Normal("|Microsoft.Plugin.Program.Main|Win32Program index cost", _packageRepository.IndexPrograms); }); Task.WaitAll(a, b); @@ -72,8 +56,6 @@ namespace Microsoft.Plugin.Program public void Save() { _settingsStorage.Save(); - _win32ProgramRepository.Save(); - _packageRepository.Save(); } public List Query(Query query)