Skip to content

Commit b1655c7

Browse files
authored
Code Quality: Improved startup performance by optimizing background tasks (#17595)
1 parent a3f7fcd commit b1655c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Files.App/Helpers/Application/AppLifecycleHelper.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ await Task.WhenAll(
116116
App.LibraryManager.UpdateLibrariesAsync(),
117117
OptionalTaskAsync(WSLDistroManager.UpdateDrivesAsync(), generalSettingsService.ShowWslSection),
118118
OptionalTaskAsync(App.FileTagsManager.UpdateFileTagsAsync(), generalSettingsService.ShowFileTagsSection),
119-
jumpListService.InitializeAsync(),
119+
jumpListService.InitializeAsync()
120+
);
121+
122+
//Start the tasks separately to reduce resource contention
123+
await Task.WhenAll(
120124
addItemService.InitializeAsync(),
121125
ContextMenu.WarmUpQueryContextMenuAsync()
122126
);

0 commit comments

Comments
 (0)